pub enum Value {
Empty,
Text(ByteString),
Map(ValueMap),
List(Box<NonEmpty<Value>>),
}
Expand description
Represents the content of an XML element.
This data structure is intended to be similar to
serde_json::Value
.
Unlike when deserializing JSON, which has explicit arrays, we have to
manually group multiple adjacent elements into an array-like structure.
Variants§
Empty
The element is empty, e.g. <foo />
Text(ByteString)
The element contains a text node, e.g. <foo>bar</foo>
Map(ValueMap)
The element contains other elements, e.g. <foo><bar /></foo>
List(Box<NonEmpty<Value>>)
The parent element contains multiple elements of this type, e.g. <foo /><foo />
Implementations§
Trait Implementations§
Source§impl From<ContentLanguage> for Value
impl From<ContentLanguage> for Value
Source§fn from(ContentLanguage: ContentLanguage) -> Value
fn from(ContentLanguage: ContentLanguage) -> Value
Converts to this type from the input type.
Source§impl From<ContentLength> for Value
impl From<ContentLength> for Value
Source§fn from(ContentLength: ContentLength) -> Value
fn from(ContentLength: ContentLength) -> Value
Converts to this type from the input type.
Source§impl From<ContentType> for Value
impl From<ContentType> for Value
Source§fn from(ContentType: ContentType) -> Value
fn from(ContentType: ContentType) -> Value
Converts to this type from the input type.
Source§impl From<CreationDate> for Value
impl From<CreationDate> for Value
Source§fn from(CreationDate: CreationDate) -> Value
fn from(CreationDate: CreationDate) -> Value
Converts to this type from the input type.
Source§impl From<DisplayName> for Value
impl From<DisplayName> for Value
Source§fn from(DisplayName: DisplayName) -> Value
fn from(DisplayName: DisplayName) -> Value
Converts to this type from the input type.
Source§impl From<LastModified> for Value
impl From<LastModified> for Value
Source§fn from(LastModified: LastModified) -> Value
fn from(LastModified: LastModified) -> Value
Converts to this type from the input type.
Source§impl From<LockDiscovery> for Value
impl From<LockDiscovery> for Value
Source§fn from(_: LockDiscovery) -> Value
fn from(_: LockDiscovery) -> Value
Converts to this type from the input type.
Source§impl From<Multistatus> for Value
impl From<Multistatus> for Value
Source§fn from(_: Multistatus) -> Value
fn from(_: Multistatus) -> Value
Converts to this type from the input type.
Source§impl From<Properties> for Value
impl From<Properties> for Value
Source§fn from(Properties: Properties) -> Value
fn from(Properties: Properties) -> Value
Converts to this type from the input type.
Source§impl From<ResourceType> for Value
impl From<ResourceType> for Value
Source§fn from(ResourceType: ResourceType) -> Value
fn from(ResourceType: ResourceType) -> Value
Converts to this type from the input type.
Source§impl From<ResponseDescription> for Value
impl From<ResponseDescription> for Value
Source§fn from(ResponseDescription: ResponseDescription) -> Value
fn from(ResponseDescription: ResponseDescription) -> Value
Converts to this type from the input type.
Source§impl From<SupportedLock> for Value
impl From<SupportedLock> for Value
Source§fn from(_: SupportedLock) -> Value
fn from(_: SupportedLock) -> Value
Converts to this type from the input type.
Source§impl TryFrom<&Value> for ContentLanguage
impl TryFrom<&Value> for ContentLanguage
Source§impl TryFrom<&Value> for ContentLength
impl TryFrom<&Value> for ContentLength
Source§impl TryFrom<&Value> for ContentType
impl TryFrom<&Value> for ContentType
Source§impl TryFrom<&Value> for CreationDate
impl TryFrom<&Value> for CreationDate
Source§impl TryFrom<&Value> for DisplayName
impl TryFrom<&Value> for DisplayName
Source§impl TryFrom<&Value> for LastModified
impl TryFrom<&Value> for LastModified
Source§impl TryFrom<&Value> for LockDiscovery
impl TryFrom<&Value> for LockDiscovery
Source§impl TryFrom<&Value> for Multistatus
impl TryFrom<&Value> for Multistatus
Source§impl TryFrom<&Value> for Properties
impl TryFrom<&Value> for Properties
Source§impl TryFrom<&Value> for ResourceType
impl TryFrom<&Value> for ResourceType
Source§impl TryFrom<&Value> for ResponseDescription
impl TryFrom<&Value> for ResponseDescription
Source§impl TryFrom<&Value> for SupportedLock
impl TryFrom<&Value> for SupportedLock
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl !Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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