[][src]Enum runestick::Visibility

pub enum Visibility {
    Inherited,
    Public,
    Crate,
    Super,
    SelfValue,
}

Information on the visibility of an item.

Variants

Inherited

Inherited, or private visibility.

Public

Something that is publicly visible pub.

Crate

Something that is only visible in the current crate pub(crate).

Super

Visible in the parent crate.

SelfValue

Only visible in the same crate.

Implementations

impl Visibility[src]

pub fn is_public(self) -> bool[src]

Test if visibility is public.

pub fn is_visible(self, from: &Item, to: &Item) -> bool[src]

Check if from can access to with the current visibility.

pub fn is_visible_inside(self, from: &Item, to: &Item) -> bool[src]

Check if from can access to with the current visibility.

Trait Implementations

impl Clone for Visibility[src]

impl Copy for Visibility[src]

impl Debug for Visibility[src]

impl Default for Visibility[src]

impl Display for Visibility[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.