pub struct QName { /* private fields */ }Expand description
Implementations§
Source§impl QName
impl QName
Sourcepub const fn new_const(
raw: &'static [u8],
index: Option<usize>,
ns: Option<Namespace>,
) -> QName
pub const fn new_const( raw: &'static [u8], index: Option<usize>, ns: Option<Namespace>, ) -> QName
Create a new QName instance from the passed raw data, index and ns.
Caution! This is a const function and can be used during compile time, but
the raw data must be valid UTF-8 and the index must be correct, otherwise
the QName is not valid.
Sourcepub fn from_bytes<X>(bytes: X) -> QName
pub fn from_bytes<X>(bytes: X) -> QName
Create a new QName instance from the passed bytes.
Sourcepub fn from_helper(helper: &DeserializeHelper, raw: &[u8]) -> QName
pub fn from_helper(helper: &DeserializeHelper, raw: &[u8]) -> QName
Create a new QName instance from the passed reader and raw data.
Sourcepub fn with_namespace(self, ns: Namespace) -> QName
pub fn with_namespace(self, ns: Namespace) -> QName
Set the namespace of the QName to ns.
Sourcepub fn take_namespace(&mut self) -> Option<Namespace>
pub fn take_namespace(&mut self) -> Option<Namespace>
Take the namespace of the QName, leaving None in its place.
Sourcepub fn local_name(&self) -> &[u8] ⓘ
pub fn local_name(&self) -> &[u8] ⓘ
Get the local name of the QName.
Trait Implementations§
Source§impl DeserializeBytes for QName
Available on crate feature quick-xml only.
impl DeserializeBytes for QName
Available on crate feature
quick-xml only.Source§fn deserialize_bytes(
helper: &mut DeserializeHelper,
bytes: &[u8],
) -> Result<QName, Error>
fn deserialize_bytes( helper: &mut DeserializeHelper, bytes: &[u8], ) -> Result<QName, Error>
Try to deserialize the type from bytes. Read more
Source§fn deserialize_str(
helper: &mut DeserializeHelper,
s: &str,
) -> Result<Self, Error>
fn deserialize_str( helper: &mut DeserializeHelper, s: &str, ) -> Result<Self, Error>
Optimized version of
deserialize_bytes that
takes a string instead of a bytes slice. Read moreSource§impl SerializeBytes for QName
Available on crate feature quick-xml only.
impl SerializeBytes for QName
Available on crate feature
quick-xml only.Source§fn serialize_bytes(
&self,
helper: &mut SerializeHelper,
) -> Result<Option<Cow<'static, str>>, Error>
fn serialize_bytes( &self, helper: &mut SerializeHelper, ) -> Result<Option<Cow<'static, str>>, Error>
Try to serialize the type to bytes. Read more
impl Eq for QName
impl WithDeserializerFromBytes for QName
impl WithSerializeToBytes for QName
Auto Trait Implementations§
impl Freeze for QName
impl RefUnwindSafe for QName
impl Send for QName
impl Sync for QName
impl Unpin for QName
impl UnsafeUnpin for QName
impl UnwindSafe for QName
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,
Source§impl<'de, R, X> DeserializeSync<'de, R> for Xwhere
R: XmlReaderSync<'de>,
X: WithDeserializer,
impl<'de, R, X> DeserializeSync<'de, R> for Xwhere
R: XmlReaderSync<'de>,
X: WithDeserializer,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<X> SerializeSync for Xwhere
X: WithSerializer,
impl<X> SerializeSync for Xwhere
X: WithSerializer,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.
Source§impl<X> WithBoxedSerializer for Xwhere
X: WithSerializer,
impl<X> WithBoxedSerializer for Xwhere
X: WithSerializer,
Source§impl<X> WithDeserializer for Xwhere
X: WithDeserializerFromBytes + Debug,
impl<X> WithDeserializer for Xwhere
X: WithDeserializerFromBytes + Debug,
Source§type Deserializer = ContentDeserializer<X>
type Deserializer = ContentDeserializer<X>
The deserializer to use for this type.
Source§fn init<'de>(
helper: &mut DeserializeHelper,
event: Event<'de>,
) -> Result<DeserializerOutput<'de, Self>, Error>
fn init<'de>( helper: &mut DeserializeHelper, event: Event<'de>, ) -> Result<DeserializerOutput<'de, Self>, Error>
Source§fn default_deserializer() -> Self::Deserializerwhere
Self::Deserializer: Default,
fn default_deserializer() -> Self::Deserializerwhere
Self::Deserializer: Default,
Create a new default deserializer. Read more
Source§fn default_value(helper: &mut DeserializeHelper) -> Result<Self, Error>where
Self::Deserializer: Default,
fn default_value(helper: &mut DeserializeHelper) -> Result<Self, Error>where
Self::Deserializer: Default,
Create a new default value by creating and default deserializer and
finish it right after. Read more
Source§impl<X> WithSerializer for Xwhere
X: WithSerializeToBytes + Debug,
impl<X> WithSerializer for Xwhere
X: WithSerializeToBytes + Debug,
Source§type Serializer<'x> = ContentSerializer<'x, X>
where
X: 'x
type Serializer<'x> = ContentSerializer<'x, X> where X: 'x
The serializer to use for this type.
Source§fn serializer<'ser>(
&'ser self,
name: Option<&'ser str>,
is_root: bool,
) -> Result<<X as WithSerializer>::Serializer<'ser>, Error>
fn serializer<'ser>( &'ser self, name: Option<&'ser str>, is_root: bool, ) -> Result<<X as WithSerializer>::Serializer<'ser>, Error>
Initializes a new serializer from the passed
value. Read more