[][src]Struct quick_xml::events::BytesDecl

pub struct BytesDecl<'a> { /* fields omitted */ }

An XML declaration (Event::Decl).

W3C XML 1.1 Prolog and Document Type Declaration

Methods

impl<'a> BytesDecl<'a>[src]

pub fn from_start(start: BytesStart<'a>) -> BytesDecl<'a>[src]

Creates a BytesDecl from a BytesStart

pub fn version(&self) -> Result<Cow<[u8]>>[src]

Gets xml version, including quotes (' or ")

pub fn encoding(&self) -> Option<Result<Cow<[u8]>>>[src]

Gets xml encoding, including quotes (' or ")

pub fn standalone(&self) -> Option<Result<Cow<[u8]>>>[src]

Gets xml standalone, including quotes (' or ")

pub fn new(
    version: &[u8],
    encoding: Option<&[u8]>,
    standalone: Option<&[u8]>
) -> BytesDecl<'static>
[src]

Constructs a new XmlDecl from the (mandatory) version (should be 1.0 or 1.1), the optional encoding (e.g., UTF-8) and the optional standalone (yes or no) attribute.

Does not escape any of its inputs. Always uses double quotes to wrap the attribute values. The caller is responsible for escaping attribute values. Shouldn't usually be relevant since the double quote character is not allowed in any of the attribute values.

pub fn into_owned(self) -> BytesDecl<'static>[src]

Converts the event into an owned event.

Trait Implementations

impl<'a> Clone for BytesDecl<'a>[src]

impl<'a> Debug for BytesDecl<'a>[src]

impl<'a> Deref for BytesDecl<'a>[src]

type Target = [u8]

The resulting type after dereferencing.

Auto Trait Implementations

impl<'a> RefUnwindSafe for BytesDecl<'a>

impl<'a> Send for BytesDecl<'a>

impl<'a> Sync for BytesDecl<'a>

impl<'a> Unpin for BytesDecl<'a>

impl<'a> UnwindSafe for BytesDecl<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.