#[non_exhaustive]pub struct XmlText(pub Vec<u8>);
Expand description
A text node in an XML document.
Tuple Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.0: Vec<u8>
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for XmlText
impl<'de> Deserialize<'de> for XmlText
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserializes a value from a deserializer.
Source§fn deserialize_seq<D: Deserializer<'de>>(reader: D) -> Result<Self, D::Error>
fn deserialize_seq<D: Deserializer<'de>>(reader: D) -> Result<Self, D::Error>
Deserializes a value from a deserializer, but tries to do it from a sequence of values.
Source§impl<'de> Deserializer<'de> for &'de XmlText
impl<'de> Deserializer<'de> for &'de XmlText
Source§impl Ord for XmlText
impl Ord for XmlText
Source§impl PartialOrd for XmlText
impl PartialOrd for XmlText
Source§impl Serializer for &mut XmlText
impl Serializer for &mut XmlText
Source§type Error = XmlValueSerializerError
type Error = XmlValueSerializerError
The type of the error that is returned when serialization fails.
Source§type SerializeElement = NoopDeSerializer<<&mut XmlText as Serializer>::Ok, XmlValueSerializerError>
type SerializeElement = NoopDeSerializer<<&mut XmlText as Serializer>::Ok, XmlValueSerializerError>
The type of the serializer that is used to serialize an element with children.
Source§type SerializeSeq = NoopDeSerializer<<&mut XmlText as Serializer>::Ok, XmlValueSerializerError>
type SerializeSeq = NoopDeSerializer<<&mut XmlText as Serializer>::Ok, XmlValueSerializerError>
The type of the serializer that is used to serialize a sequence of elements.
Source§fn serialize_text<S: AsRef<str>>(self, text: S) -> Result<Self::Ok, Self::Error>
fn serialize_text<S: AsRef<str>>(self, text: S) -> Result<Self::Ok, Self::Error>
Serialize a text node.
Source§fn serialize_cdata<S: AsRef<str>>(
self,
text: S,
) -> Result<Self::Ok, Self::Error>
fn serialize_cdata<S: AsRef<str>>( self, text: S, ) -> Result<Self::Ok, Self::Error>
Serialize a CDATA section.
Source§fn serialize_element(
self,
name: &ExpandedName<'_>,
) -> Result<Self::SerializeElement, Self::Error>
fn serialize_element( self, name: &ExpandedName<'_>, ) -> Result<Self::SerializeElement, Self::Error>
Serialize an element with children.
Source§fn serialize_seq(self) -> Result<Self::SerializeSeq, Self::Error>
fn serialize_seq(self) -> Result<Self::SerializeSeq, Self::Error>
Serialize a sequence of elements.
Source§fn serialize_decl<S: AsRef<str>>(
self,
version: S,
encoding: Option<S>,
standalone: Option<S>,
) -> Result<Self::Ok, Self::Error>
fn serialize_decl<S: AsRef<str>>( self, version: S, encoding: Option<S>, standalone: Option<S>, ) -> Result<Self::Ok, Self::Error>
Serialize an XML declaration.
Source§fn serialize_pi<S: AsRef<[u8]>>(
self,
target: S,
content: S,
) -> Result<Self::Ok, Self::Error>
fn serialize_pi<S: AsRef<[u8]>>( self, target: S, content: S, ) -> Result<Self::Ok, Self::Error>
Serialize a processing instruction.
Source§fn serialize_comment<S: AsRef<[u8]>>(
self,
text: S,
) -> Result<Self::Ok, Self::Error>
fn serialize_comment<S: AsRef<[u8]>>( self, text: S, ) -> Result<Self::Ok, Self::Error>
Serialize a comment.
Source§impl<'de> XmlText<'de> for &'de XmlText
impl<'de> XmlText<'de> for &'de XmlText
Source§type NamespaceContext<'a> = ()
where
Self: 'a
type NamespaceContext<'a> = () where Self: 'a
The type of the namespace context returned by [
AttributeAccess::namespace_context
].Source§fn into_bytes(self) -> Cow<'de, [u8]>
fn into_bytes(self) -> Cow<'de, [u8]>
Returns the owned byte representation of the text.
Source§fn into_string(self) -> Cow<'de, str>
fn into_string(self) -> Cow<'de, str>
Returns the owned string representation of the text.
Source§fn namespace_context(&self) -> Self::NamespaceContext<'_>
fn namespace_context(&self) -> Self::NamespaceContext<'_>
Returns the namespace context of the text.
impl Eq for XmlText
impl StructuralPartialEq for XmlText
Auto Trait Implementations§
impl Freeze for XmlText
impl RefUnwindSafe for XmlText
impl Send for XmlText
impl Sync for XmlText
impl Unpin for XmlText
impl UnwindSafe for XmlText
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