pub struct Document { /* private fields */ }Expand description
Parsed ILCD+EPD document retaining the exact original UTF-8 bytes.
Implementations§
Source§impl Document
impl Document
Sourcepub fn parse(input: &[u8]) -> Result<Self, ParseError>
pub fn parse(input: &[u8]) -> Result<Self, ParseError>
Parses an ILCD+EPD v1.3 process dataset with default resource limits.
Sourcepub fn parse_with_options(
input: &[u8],
options: ParseOptions,
) -> Result<Self, ParseError>
pub fn parse_with_options( input: &[u8], options: ParseOptions, ) -> Result<Self, ParseError>
Parses with explicit resource limits.
Sourcepub const fn process(&self) -> &ProcessDataset
pub const fn process(&self) -> &ProcessDataset
Typed process-dataset view.
Sourcepub const fn format_version(&self) -> FormatVersion
pub const fn format_version(&self) -> FormatVersion
Explicit ILCD+EPD wire-format revision.
Sourcepub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_bytes(&self) -> &[u8] ⓘ
Exact original XML bytes, including unknown content and formatting.
Sourcepub fn write_original(&self, writer: &mut impl Write) -> Result<()>
pub fn write_original(&self, writer: &mut impl Write) -> Result<()>
Writes the exact original XML bytes without reconstruction.
Sourcepub fn into_bytes(self) -> Box<[u8]>
pub fn into_bytes(self) -> Box<[u8]>
Consumes the document and returns the exact original XML bytes.
Trait Implementations§
impl Eq for Document
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
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