pub struct RenderedDocument { /* private fields */ }Expand description
Immutable output of a complete successful validation. No constructor or deserializer can fabricate checked output. Extracted text is ordinary text; modifying it does not preserve this object’s validation guarantee.
Implementations§
Source§impl RenderedDocument
impl RenderedDocument
pub fn text(&self) -> &str
pub fn measurement(&self) -> &TextMeasurement
pub fn report(&self) -> &Report
pub fn spans(&self) -> &[RenderedSpan]
Sourcepub fn element(&self, id: &str) -> Option<&str>
pub fn element(&self, id: &str) -> Option<&str>
Select from an already checked whole document. Ancestor and sibling budgets were validated before any element became available.
pub fn elements(&self) -> &[RenderedElement]
pub fn elements_by_name(&self, name: &str) -> Vec<&str>
pub fn into_text(self) -> String
Trait Implementations§
Source§impl Clone for RenderedDocument
impl Clone for RenderedDocument
Source§fn clone(&self) -> RenderedDocument
fn clone(&self) -> RenderedDocument
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RenderedDocument
impl RefUnwindSafe for RenderedDocument
impl Send for RenderedDocument
impl Sync for RenderedDocument
impl Unpin for RenderedDocument
impl UnsafeUnpin for RenderedDocument
impl UnwindSafe for RenderedDocument
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