pub enum PathOrigin {
Absolute,
Relative(usize),
Package(String),
}Available on crate feature
imports only.Variants§
Absolute
Import relative to the current package root, starting with ‘package::’.
Relative(usize)
Import relative to the current module, starting with ‘super::’. The usize is the number of ‘super’.
Package(String)
Import from a package dependency, starting with the extern package name.
Implementations§
Source§impl PathOrigin
impl PathOrigin
Sourcepub const fn is_absolute(&self) -> bool
pub const fn is_absolute(&self) -> bool
Returns true if this value is of type Absolute. Returns false otherwise
Sourcepub const fn is_relative(&self) -> bool
pub const fn is_relative(&self) -> bool
Returns true if this value is of type Relative. Returns false otherwise
Sourcepub const fn is_package(&self) -> bool
pub const fn is_package(&self) -> bool
Returns true if this value is of type Package. Returns false otherwise
Trait Implementations§
Source§impl Clone for PathOrigin
impl Clone for PathOrigin
Source§fn clone(&self) -> PathOrigin
fn clone(&self) -> PathOrigin
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PathOrigin
impl Debug for PathOrigin
Source§impl<'de> Deserialize<'de> for PathOrigin
impl<'de> Deserialize<'de> for PathOrigin
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
Source§impl Hash for PathOrigin
impl Hash for PathOrigin
Source§impl PartialEq for PathOrigin
impl PartialEq for PathOrigin
Source§impl Serialize for PathOrigin
impl Serialize for PathOrigin
Source§impl TokRepr for PathOrigin
impl TokRepr for PathOrigin
fn tok_repr(&self) -> TokenStream
impl Eq for PathOrigin
impl StructuralPartialEq for PathOrigin
Auto Trait Implementations§
impl Freeze for PathOrigin
impl RefUnwindSafe for PathOrigin
impl Send for PathOrigin
impl Sync for PathOrigin
impl Unpin for PathOrigin
impl UnwindSafe for PathOrigin
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,
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