Enum syn::Visibility

source ·
pub enum Visibility {
    Public(Pub),
    Restricted(VisRestricted),
    Inherited,
}
Expand description

The visibility level of an item: inherited or pub or pub(restricted).

Syntax tree enum

This type is a syntax tree enum.

Variants§

§

Public(Pub)

A public visibility level: pub.

§

Restricted(VisRestricted)

A visibility level restricted to some path: pub(self) or pub(super) or pub(crate) or pub(in some::module).

§

Inherited

An inherited visibility, which usually means private.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.