Enum syn::Visibility
source · pub enum Visibility {
Public(VisPublic),
Crate(VisCrate),
Restricted(VisRestricted),
Inherited,
}
Expand description
The visibility level of an item: inherited or pub
or
pub(restricted)
.
This type is available only if Syn is built with the "derive"
or "full"
feature.
Syntax tree enum
This type is a syntax tree enum.
Variants§
Public(VisPublic)
A public visibility level: pub
.
Crate(VisCrate)
A crate-level visibility: crate
.
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.
Trait Implementations§
source§impl Clone for Visibility
impl Clone for Visibility
source§impl Debug for Visibility
impl Debug for Visibility
source§impl From<VisCrate> for Visibility
impl From<VisCrate> for Visibility
source§fn from(e: VisCrate) -> Visibility
fn from(e: VisCrate) -> Visibility
Converts to this type from the input type.
source§impl From<VisPublic> for Visibility
impl From<VisPublic> for Visibility
source§fn from(e: VisPublic) -> Visibility
fn from(e: VisPublic) -> Visibility
Converts to this type from the input type.
source§impl From<VisRestricted> for Visibility
impl From<VisRestricted> for Visibility
source§fn from(e: VisRestricted) -> Visibility
fn from(e: VisRestricted) -> Visibility
Converts to this type from the input type.