pub enum PathOrigin {
Absolute,
Relative(usize),
Package(String),
}Expand description
WESL imports extension
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’s.
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 (const: unstable) · 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
impl Eq for PathOrigin
Source§impl Hash for PathOrigin
impl Hash for PathOrigin
Source§impl PartialEq for PathOrigin
impl PartialEq 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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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