pub enum TokenValue {
Token(TokenBuf),
Language(LanguageBuf),
Name(NameBuf),
NCName(NCNameBuf),
Id(IdBuf),
IdRef(IdRefBuf),
NMToken(NMTokenBuf),
}
Expand description
Any specialized Token
value.
Variants§
Token(TokenBuf)
Language(LanguageBuf)
Name(NameBuf)
NCName(NCNameBuf)
Id(IdBuf)
IdRef(IdRefBuf)
NMToken(NMTokenBuf)
Implementations§
Source§impl TokenValue
impl TokenValue
pub fn datatype(&self) -> TokenDatatype
Source§impl TokenValue
impl TokenValue
pub fn as_ref(&self) -> TokenValueRef<'_>
Trait Implementations§
Source§impl Clone for TokenValue
impl Clone for TokenValue
Source§fn clone(&self) -> TokenValue
fn clone(&self) -> TokenValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TokenValue
impl Debug for TokenValue
Source§impl Display for TokenValue
impl Display for TokenValue
Source§impl From<NCNameValue> for TokenValue
impl From<NCNameValue> for TokenValue
Source§fn from(value: NCNameValue) -> Self
fn from(value: NCNameValue) -> Self
Converts to this type from the input type.
Source§impl From<NameValue> for TokenValue
impl From<NameValue> for TokenValue
Source§impl From<TokenValue> for NormalizedStringValue
impl From<TokenValue> for NormalizedStringValue
Source§fn from(value: TokenValue) -> Self
fn from(value: TokenValue) -> Self
Converts to this type from the input type.
Source§impl From<TokenValue> for StringValue
impl From<TokenValue> for StringValue
Source§fn from(value: TokenValue) -> Self
fn from(value: TokenValue) -> Self
Converts to this type from the input type.
Source§impl From<TokenValue> for Value
impl From<TokenValue> for Value
Source§fn from(value: TokenValue) -> Self
fn from(value: TokenValue) -> Self
Converts to this type from the input type.
Source§impl TryFrom<NormalizedStringValue> for TokenValue
impl TryFrom<NormalizedStringValue> for TokenValue
Source§type Error = NormalizedStringValue
type Error = NormalizedStringValue
The type returned in the event of a conversion error.
Source§fn try_from(value: NormalizedStringValue) -> Result<Self, NormalizedStringValue>
fn try_from(value: NormalizedStringValue) -> Result<Self, NormalizedStringValue>
Performs the conversion.
Source§impl TryFrom<StringValue> for TokenValue
impl TryFrom<StringValue> for TokenValue
Source§type Error = StringValue
type Error = StringValue
The type returned in the event of a conversion error.
Source§fn try_from(value: StringValue) -> Result<Self, StringValue>
fn try_from(value: StringValue) -> Result<Self, StringValue>
Performs the conversion.
Source§impl TryFrom<TokenValue> for NCNameValue
impl TryFrom<TokenValue> for NCNameValue
Source§type Error = TokenValue
type Error = TokenValue
The type returned in the event of a conversion error.
Source§fn try_from(value: TokenValue) -> Result<Self, TokenValue>
fn try_from(value: TokenValue) -> Result<Self, TokenValue>
Performs the conversion.
Source§impl TryFrom<TokenValue> for NameValue
impl TryFrom<TokenValue> for NameValue
Source§type Error = TokenValue
type Error = TokenValue
The type returned in the event of a conversion error.
Source§fn try_from(value: TokenValue) -> Result<Self, TokenValue>
fn try_from(value: TokenValue) -> Result<Self, TokenValue>
Performs the conversion.
Source§impl TryFrom<Value> for TokenValue
impl TryFrom<Value> for TokenValue
Auto Trait Implementations§
impl Freeze for TokenValue
impl RefUnwindSafe for TokenValue
impl Send for TokenValue
impl Sync for TokenValue
impl Unpin for TokenValue
impl UnwindSafe for TokenValue
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