[−][src]Struct scale_info::Path
Represents the path of a type definition.
This consists of several segments that each have to be a valid Rust identifier. The first segment represents the crate name in which the type has been defined. The last
Rust prelude type may have an empty namespace definition.
Implementations
impl Path[src]
pub fn new(ident: &'static str, module_path: &'static str) -> Path[src]
pub fn from_segments<I>(segments: I) -> Result<Path, PathError> where
I: IntoIterator<Item = &'static str>, [src]
I: IntoIterator<Item = &'static str>,
Create a Path from the given segments
Errors
- If no segments are supplied
- If any of the segments are invalid Rust identifiers
impl Path[src]
pub fn is_empty(&self) -> bool[src]
Returns true if the path is empty
pub fn ident(&self) -> Option<&str>[src]
Get the ident segment of the Path
pub fn namespace(&self) -> &[&'static str][src]
Get the namespace segments of the Path
Trait Implementations
impl Clone for Path[src]
impl Debug for Path[src]
impl Default for Path[src]
impl Eq for Path[src]
impl Ord for Path[src]
fn cmp(&self, other: &Path) -> Ordering[src]
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl PartialEq<Path> for Path[src]
impl PartialOrd<Path> for Path[src]
fn partial_cmp(&self, other: &Path) -> Option<Ordering>[src]
fn lt(&self, other: &Path) -> bool[src]
fn le(&self, other: &Path) -> bool[src]
fn gt(&self, other: &Path) -> bool[src]
fn ge(&self, other: &Path) -> bool[src]
impl Serialize for Path[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
impl StructuralEq for Path[src]
impl StructuralPartialEq for Path[src]
Auto Trait Implementations
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
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> 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, 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>,