pub enum PathHead {
Package,
Here,
Up(u8),
SelfType,
Named,
Root,
}Expand description
The nouns of the plugin contract that appear in the engine’s answers, so an interface needs nothing but this crate. Where a path starts: the part before its segments that says what they are relative to.
Variants§
Package
The root of the package the file belongs to: Rust’s crate::.
Here
The file’s own module or directory: self::, ./.
Up(u8)
n levels up from the file’s module or directory: super::super::,
../../.
SelfType
The enclosing type, not a module: Rust’s Self::. Never a module path.
Named
A named package or an in-scope name, which only the layout can tell
apart: serde::, react, @scope/pkg, a child module, an imported
name. The name is the first segment.
Root
The file system root: /x/y.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PathHead
impl<'de> Deserialize<'de> for PathHead
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PathHead, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PathHead, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PathHead
Source§impl Ord for PathHead
impl Ord for PathHead
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for PathHead
impl PartialOrd for PathHead
Source§impl Serialize for PathHead
impl Serialize for PathHead
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PathHead
Auto Trait Implementations§
impl Freeze for PathHead
impl RefUnwindSafe for PathHead
impl Send for PathHead
impl Sync for PathHead
impl Unpin for PathHead
impl UnsafeUnpin for PathHead
impl UnwindSafe for PathHead
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