pub struct WitName<'a> {
pub namespaces: Vec<&'a str>,
pub name: &'a str,
pub _version: Vec<&'a str>,
}
Expand description
A parsed representation of a WIT name, containing package namespaces, an actual name, and possibly a SemVer version
Fields§
§namespaces: Vec<&'a str>
§name: &'a str
§_version: Vec<&'a str>
Implementations§
Source§impl<'a> WitName<'a>
impl<'a> WitName<'a>
Sourcepub fn namespace_idents(&self) -> Vec<Ident>
pub fn namespace_idents(&self) -> Vec<Ident>
Extract a list of Rust module names corresponding to the WIT namespace/package
Sourcepub fn namespace_path(&self) -> TokenStream
pub fn namespace_path(&self) -> TokenStream
Extract a token stream representing the Rust namespace path corresponding to the WIT namespace/package
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for WitName<'a>
impl<'a> RefUnwindSafe for WitName<'a>
impl<'a> Send for WitName<'a>
impl<'a> Sync for WitName<'a>
impl<'a> Unpin for WitName<'a>
impl<'a> UnwindSafe for WitName<'a>
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