[−][src]Struct ra_ap_hir::ModPath
Fields
kind: PathKind
segments: Vec<Name>
Implementations
impl ModPath
[src]
pub fn from_src(path: Path, hygiene: &Hygiene) -> Option<ModPath>
[src]
pub fn from_segments(
kind: PathKind,
segments: impl IntoIterator<Item = Name>
) -> ModPath
[src]
kind: PathKind,
segments: impl IntoIterator<Item = Name>
) -> ModPath
pub fn len(&self) -> usize
[src]
Returns the number of segments in the path (counting special segments like $crate
and
super
).
pub fn is_ident(&self) -> bool
[src]
pub fn is_self(&self) -> bool
[src]
pub fn as_ident(&self) -> Option<&Name>
[src]
If this path is a single identifier, like foo
, return its name.
Trait Implementations
impl Clone for ModPath
[src]
impl Debug for ModPath
[src]
impl Display for ModPath
[src]
impl Eq for ModPath
[src]
impl From<Name> for ModPath
[src]
impl Hash for ModPath
[src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for ModPath
[src]
fn cmp(&self, other: &ModPath) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<ModPath> for ModPath
[src]
impl PartialOrd<ModPath> for ModPath
[src]
Auto Trait Implementations
impl RefUnwindSafe for ModPath
impl Send for ModPath
impl Sync for ModPath
impl Unpin for ModPath
impl UnwindSafe for ModPath
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Cast for T
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Self: CastTo<U>,
U: HasInterner,
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,