pub struct SymbolRef<'a> { /* private fields */ }Expand description
A reference to a fully resolved symbol. Like Symbol (a fully resolved symbol with a
static lifetime), a SymbolRef may have known or undefined text (i.e. $0).
Implementations§
Source§impl<'a> SymbolRef<'a>
impl<'a> SymbolRef<'a>
Sourcepub fn text(&self) -> Option<&'a str>
pub fn text(&self) -> Option<&'a str>
If this symbol has known text, returns Some(&str). Otherwise, returns None.
Sourcepub fn with_unknown_text() -> Self
pub fn with_unknown_text() -> Self
Constructs a SymbolRef with unknown text.
Sourcepub fn with_text(text: &'a str) -> SymbolRef<'a>
pub fn with_text(text: &'a str) -> SymbolRef<'a>
Constructs a SymbolRef with the specified text.
pub fn to_owned(self) -> Symbol
pub fn expect_text(&self) -> IonResult<&'a str>
Trait Implementations§
impl<'a> Copy for SymbolRef<'a>
impl<'a> Eq for SymbolRef<'a>
Source§impl<'a> Ord for SymbolRef<'a>
impl<'a> Ord for SymbolRef<'a>
1.21.0 (const: unstable) · 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> PartialEq for SymbolRef<'a>
impl<'a> PartialEq for SymbolRef<'a>
Source§impl<'a> PartialOrd for SymbolRef<'a>
impl<'a> PartialOrd for SymbolRef<'a>
impl<'a> StructuralPartialEq for SymbolRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for SymbolRef<'a>
impl<'a> RefUnwindSafe for SymbolRef<'a>
impl<'a> Send for SymbolRef<'a>
impl<'a> Sync for SymbolRef<'a>
impl<'a> Unpin for SymbolRef<'a>
impl<'a> UnsafeUnpin for SymbolRef<'a>
impl<'a> UnwindSafe for SymbolRef<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<V> IntoAnnotatedElement for V
impl<V> IntoAnnotatedElement for V
Source§fn with_annotations<I: IntoAnnotations>(self, annotations: I) -> Element
fn with_annotations<I: IntoAnnotations>(self, annotations: I) -> Element
Converts the value into an Element with the specified annotations.