pub struct Symbol<'a> {
pub version: Option<u64>,
pub path: Rc<Path<'a>>,
pub instantiating_crate: Option<Rc<Path<'a>>>,
pub vendor_specific_suffix: Option<&'a str>,
}Fields§
§version: Option<u64>§path: Rc<Path<'a>>§instantiating_crate: Option<Rc<Path<'a>>>§vendor_specific_suffix: Option<&'a str>Implementations§
Source§impl<'a> Symbol<'a>
impl<'a> Symbol<'a>
Sourcepub fn display(&self, style: DisplayStyle) -> impl Display + '_
pub fn display(&self, style: DisplayStyle) -> impl Display + '_
Returns an object that implements Display for printing the symbol.
Sourcepub fn parse_from_str(
input: &'a str,
) -> Result<(Self, &'a str), ParseSymbolError>
pub fn parse_from_str( input: &'a str, ) -> Result<(Self, &'a str), ParseSymbolError>
Parses input with Rust
v0 syntax,
returns a tuple that contains a Symbol object and an &str object containing the suffix that is
not part of the the Rust v0 syntax.
§Errors
Returns ParseSymbolError if input does not start with a valid prefix with Rust v0 syntax.
Trait Implementations§
Source§impl<'a> Ord for Symbol<'a>
impl<'a> Ord for Symbol<'a>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialOrd for Symbol<'a>
impl<'a> PartialOrd for Symbol<'a>
impl<'a> Eq for Symbol<'a>
impl<'a> StructuralPartialEq for Symbol<'a>
Auto Trait Implementations§
impl<'a> Freeze for Symbol<'a>
impl<'a> RefUnwindSafe for Symbol<'a>
impl<'a> !Send for Symbol<'a>
impl<'a> !Sync for Symbol<'a>
impl<'a> Unpin for Symbol<'a>
impl<'a> UnwindSafe for Symbol<'a>
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