pub enum Reach {
Within(Address),
Package(PackageId),
Everyone,
}Expand description
The set of modules that may name a declaration: a kind applied to the declaring module’s address. Never declared, always computed.
Variants§
Implementations§
Source§impl Reach
impl Reach
Sourcepub fn of(kind: ReachKind, declaring: &Address, path: Option<Address>) -> Self
pub fn of(kind: ReachKind, declaring: &Address, path: Option<Address>) -> Self
kind applied to declaring. A Path kind needs its module
resolved by the caller; unresolved, it is treated as the declaring
module, the narrowest reading.
Sourcepub fn narrowest(declaring: &Address, consumers: &[Address]) -> ReachKind
pub fn narrowest(declaring: &Address, consumers: &[Address]) -> ReachKind
The narrowest kind real code writes that admits every consumer of a
declaration in declaring: the parent when they all sit under it,
else the package; another package means pub, which is never
inferred.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Reach
impl<'de> Deserialize<'de> for Reach
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Reach
impl StructuralPartialEq for Reach
Auto Trait Implementations§
impl Freeze for Reach
impl RefUnwindSafe for Reach
impl Send for Reach
impl Sync for Reach
impl Unpin for Reach
impl UnsafeUnpin for Reach
impl UnwindSafe for Reach
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more