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
sourceimpl From<VisCrate> for Visibility
impl From<VisCrate> for Visibility
sourcefn from(e: VisCrate) -> Visibility
fn from(e: VisCrate) -> Visibility
Converts to this type from the input type.
sourceimpl From<VisPublic> for Visibility
impl From<VisPublic> for Visibility
sourcefn from(e: VisPublic) -> Visibility
fn from(e: VisPublic) -> Visibility
Converts to this type from the input type.
sourceimpl From<VisRestricted> for Visibility
impl From<VisRestricted> for Visibility
sourcefn from(e: VisRestricted) -> Visibility
fn from(e: VisRestricted) -> Visibility
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for Visibility
impl !Send for Visibility
impl !Sync for Visibility
impl Unpin for Visibility
impl UnwindSafe for Visibility
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more