pub enum Visibility {
Private,
Module,
Parent,
Crate,
Public,
}Expand description
The reach one stamped item is written at, as the site spells it.
The five non-parameterized forms and no more: a front door spells every reach it admits as literal syntax, so a parameterized reach is a change to that grammar rather than a value this roster can carry.
Variants§
Private
No visibility token: private to the module the site sits in.
Module
pub(self) — the same reach, spelled.
Parent
pub(super).
Crate
pub(crate).
Public
pub.
Implementations§
Source§impl Visibility
impl Visibility
Sourcepub const fn transported(self) -> TransportedReach
pub const fn transported(self) -> TransportedReach
The reach a stamped item carries inside the module a pattern seats it in.
This is the one place the transport is decided, so the front arm a definition renders and the reach the stamped item wears are one answer rather than two that agree until one is edited. A constant answer over a closed roster, so a sixth reach admitted later stops the compiler here until somebody says what it becomes one level in.
§Bounds
The two private reaches name the same scope and transport to the same one; the parent-facing reach gains a segment; the crate-facing and public reaches are absolute and the extra module does not move them.
Trait Implementations§
Source§impl Clone for Visibility
impl Clone for Visibility
Source§fn clone(&self) -> Visibility
fn clone(&self) -> Visibility
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more