pub struct IPath {
pub leading_colon: Option<ISpan>,
pub segments: Vec<IPathSegment>,
}Fields§
§leading_colon: Option<ISpan>§segments: Vec<IPathSegment>Implementations§
Source§impl IPath
impl IPath
Sourcepub fn starts_with_absolute(&self, segments: &[&str]) -> bool
pub fn starts_with_absolute(&self, segments: &[&str]) -> bool
Returns true if the path is absolute and the segment idents start with the given strings.
Does not take generics into account.
Sourcepub fn matches_relative(&self, segments: &[&str]) -> bool
pub fn matches_relative(&self, segments: &[&str]) -> bool
Returns true if the path is relative and the segment idents match the given strings.
Does not take generics into account.
pub fn from_ident(ident: IIdent) -> Self
pub fn span(&self) -> &ISpan
pub fn segments_strs(&self) -> impl Iterator<Item = &str>
pub fn get_ident(&self) -> Option<&IIdent>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IPath
impl<'de> Deserialize<'de> for IPath
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 IPath
Auto Trait Implementations§
impl Freeze for IPath
impl RefUnwindSafe for IPath
impl Send for IPath
impl Sync for IPath
impl Unpin for IPath
impl UnwindSafe for IPath
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.