Enum rustc::ty::Visibility [] [src]

pub enum Visibility {
    Public,
    Restricted(NodeId),
    PrivateExternal,
}
Unstable (rustc_private)

Variants

Public
Unstable (rustc_private)

Visible everywhere (including in other crates).

Restricted(NodeId)
Unstable (rustc_private)

Visible only in the given crate-local module.

PrivateExternal
Unstable (rustc_private)

Not visible anywhere in the local crate. This is the visibility of private external items.

Methods

impl Visibility
[src]

fn from_hir(visibility: &Visibility, id: NodeId, tcx: TyCtxt) -> Self

fn is_accessible_from<T: NodeIdTree>(self, block: NodeId, tree: &T) -> bool

Unstable (rustc_private)

Returns true if an item with this visibility is accessible from the given block.

fn is_at_least<T: NodeIdTree>(self, vis: Visibility, tree: &T) -> bool

Unstable (rustc_private)

Returns true if this visibility is at least as accessible as the given visibility

Trait Implementations

Derived Implementations

impl Copy for Visibility
[src]

impl Eq for Visibility
[src]

impl PartialEq for Visibility
[src]

fn eq(&self, __arg_0: &Visibility) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Visibility) -> bool

This method tests for !=.

impl Debug for Visibility
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for Visibility
[src]

fn clone(&self) -> Visibility

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more