Struct ra_ap_hir_def::path::ModPath [−][src]
pub struct ModPath { pub kind: PathKind, // some fields omitted }
Fields
kind: PathKind
Implementations
impl ModPath
[src]
impl ModPath
[src]pub fn from_src(
db: &dyn DefDatabase,
path: Path,
hygiene: &Hygiene
) -> Option<ModPath>
[src]
db: &dyn DefDatabase,
path: Path,
hygiene: &Hygiene
) -> Option<ModPath>
pub fn from_segments(
kind: PathKind,
segments: impl IntoIterator<Item = Name>
) -> ModPath
[src]
kind: PathKind,
segments: impl IntoIterator<Item = Name>
) -> ModPath
pub const fn from_kind(kind: PathKind) -> ModPath
[src]
pub const fn from_kind(kind: PathKind) -> ModPath
[src]Creates a ModPath
from a PathKind
, with no extra path segments.
pub fn segments(&self) -> &[Name]ⓘ
[src]
pub fn push_segment(&mut self, segment: Name)
[src]
pub fn pop_segment(&mut self) -> Option<Name>
[src]
pub fn len(&self) -> usize
[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]
Trait Implementations
impl Internable for ModPath
[src]
impl Internable for ModPath
[src]fn storage() -> &'static InternStorage<Self>
[src]
impl Ord for ModPath
[src]
impl Ord for ModPath
[src]impl PartialOrd<ModPath> for ModPath
[src]
impl PartialOrd<ModPath> for ModPath
[src]fn partial_cmp(&self, other: &ModPath) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &ModPath) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for ModPath
[src]
impl StructuralEq for ModPath
[src]
impl StructuralPartialEq 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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> Any for T where
T: Any,
[src]
T: Any,
impl<T> CloneAny for T where
T: Any + Clone,
[src]
T: Any + Clone,