pub enum NodeValue {
String(CompactString),
Jid(Jid),
}Expand description
An owned attribute value that can be either a string or a structured JID. This avoids string allocation for JID attributes by storing the JID directly, eliminating format/parse overhead when routing logic needs the JID.
Variants§
String(CompactString)
Jid(Jid)
Implementations§
Trait Implementations§
Source§impl From<&CompactString> for NodeValue
impl From<&CompactString> for NodeValue
Source§fn from(s: &CompactString) -> Self
fn from(s: &CompactString) -> Self
Converts to this type from the input type.
Source§impl From<CompactString> for NodeValue
impl From<CompactString> for NodeValue
Source§fn from(s: CompactString) -> Self
fn from(s: CompactString) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for NodeValue
Auto Trait Implementations§
impl Forget for NodeValue
impl Freeze for NodeValue
impl Move for NodeValue
impl RefUnwindSafe for NodeValue
impl Send for NodeValuewhere
Repr: Send,
impl Sync for NodeValuewhere
Repr: Sync,
impl Unpin for NodeValue
impl UnsafeUnpin for NodeValue
impl UnwindSafe for NodeValue
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more