[][src]Struct ra_ap_hir::ModPath

pub struct ModPath {
    pub kind: PathKind,
    pub segments: Vec<Name>,
}

Fields

kind: PathKindsegments: 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]

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]

impl Ord for ModPath[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]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Cast for T

impl<T> CloneAny for T where
    T: Clone + Any

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.