pub enum ValueRef<'a> {
String(Cow<'a, str>),
Jid(JidRef<'a>),
}Expand description
A decoded attribute value that can be either a string or a structured JID. This avoids string allocation when decoding JID tokens - the JidRef is returned directly and only converted to a string when actually needed.
Variants§
Implementations§
Source§impl<'a> ValueRef<'a>
impl<'a> ValueRef<'a>
Trait Implementations§
impl<'a> StructuralPartialEq for ValueRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for ValueRef<'a>
impl<'a> RefUnwindSafe for ValueRef<'a>
impl<'a> Send for ValueRef<'a>
impl<'a> Sync for ValueRef<'a>
impl<'a> Unpin for ValueRef<'a>
impl<'a> UnwindSafe for ValueRef<'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