Skip to main content

Parsed

Struct Parsed 

Source
pub struct Parsed<'b> {
    pub document: Document,
    pub encoding: &'static Encoding,
    pub text: Cow<'b, str>,
}
Expand description

A document parsed from bytes, and the text it was decoded to.

Fields§

§document: Document§encoding: &'static Encoding

The encoding the bytes were decoded from.

§text: Cow<'b, str>

The decoded text, without a byte order mark: the document’s spans are offsets into it. Borrowed from the bytes when they’re UTF-8.

Trait Implementations§

Source§

impl<'b> Debug for Parsed<'b>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'b> !Freeze for Parsed<'b>

§

impl<'b> Forget for Parsed<'b>

§

impl<'b> Move for Parsed<'b>

§

impl<'b> RefUnwindSafe for Parsed<'b>

§

impl<'b> Send for Parsed<'b>
where RawVecInner: Send, BoxRaw<str>: Send, RawTable<(Box<str>, u32)>: Send, RawTable<(u32, u32)>: Send, OnceLock<Declared>: Send, &'static str: Send, String: Send, &'static Encoding: Send, &'b str: Send,

§

impl<'b> Sync for Parsed<'b>
where RawVecInner: Sync, BoxRaw<str>: Sync, RawTable<(Box<str>, u32)>: Sync, RawTable<(u32, u32)>: Sync, OnceLock<Declared>: Sync, String: Sync,

§

impl<'b> Unpin for Parsed<'b>
where *const u8 is !null: Unpin, Box<str>: Unpin, Align4<u32>: Unpin, &'static str: Unpin, String: Unpin, &'static Encoding: Unpin, &'b str: Unpin,

§

impl<'b> UnsafeUnpin for Parsed<'b>

§

impl<'b> UnwindSafe for Parsed<'b>
where RawVecInner: UnwindSafe, BoxRaw<str>: UnwindSafe, HashMap<Box<str>, u32>: UnwindSafe, HashMap<u32, u32>: UnwindSafe, OnceLock<Declared>: UnwindSafe, &'static str: UnwindSafe, String: UnwindSafe, &'static Encoding: UnwindSafe, &'b str: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.