Trait XmlComment

Source
pub trait XmlComment<'de> {
    type NamespaceContext<'a>: NamespaceContext + 'a
       where Self: 'a;

    // Required methods
    fn into_bytes(self) -> Cow<'de, [u8]>;
    fn as_bytes(&self) -> &[u8] ;
    fn namespace_context(&self) -> Self::NamespaceContext<'_>;
}
Expand description

Trait for XML comments.

Required Associated Types§

Source

type NamespaceContext<'a>: NamespaceContext + 'a where Self: 'a

The type of the namespace context returned by [AttributeAccess::namespace_context].

Required Methods§

Source

fn into_bytes(self) -> Cow<'de, [u8]>

Returns the owned byte representation of the comment.

Source

fn as_bytes(&self) -> &[u8]

Returns the byte representation of the comment.

Source

fn namespace_context(&self) -> Self::NamespaceContext<'_>

Returns the namespace context of the comment.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'de> XmlComment<'de> for &'de XmlComment

Source§

type NamespaceContext<'a> = () where Self: 'a