Enum Visibility
pub enum Visibility
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)orpub(super)orpub(crate)orpub(in some::module).-
Inherited An inherited visibility, which usually means private.
Trait Implementations
impl Clone for Visibility
fn clone(&self) -> Self
impl Parse for Visibility
fn parse(input: ParseStream<'_>) -> Result<Self>
impl ToTokens for Visibility
fn to_tokens(&self, tokens: &mut TokenStream)
Auto Trait Implementations
impl !Send for Visibility
impl !Sync for Visibility
impl Freeze for Visibility
impl RefUnwindSafe for Visibility
impl Unpin for Visibility
impl UnsafeUnpin for Visibility
impl UnwindSafe for Visibility
Blanket Implementations
impl<T> Any for Visibility
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Visibility
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Visibility
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Visibility
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Visibility
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Spanned for Visibility
where
T: Spanned + ?Sized,
fn span(&self) -> Span
impl<T> ToOwned for Visibility
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Visibility
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Visibility
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Visibility
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>