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 EncodingThe 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§
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>
impl<'b> Sync for Parsed<'b>
impl<'b> Unpin for Parsed<'b>
impl<'b> UnsafeUnpin for Parsed<'b>where
*const u8 is !null: UnsafeUnpin,
PhantomData<Node>: UnsafeUnpin,
PhantomData<AttrData>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<QName>: UnsafeUnpin,
PhantomData<(Box<str>, u32)>: UnsafeUnpin,
PhantomData<Box<str>>: UnsafeUnpin,
PhantomData<EntityDecl>: UnsafeUnpin,
PhantomData<Notation>: UnsafeUnpin,
PhantomData<(u32, u32)>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
PhantomData<Declared>: UnsafeUnpin,
PhantomData<Diagnostic>: UnsafeUnpin,
&'static Encoding: UnsafeUnpin,
&'b str: UnsafeUnpin,
String: UnsafeUnpin,
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> 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