#[non_exhaustive]pub struct StreamObject {
pub dictionary: Dictionary,
pub raw_range: StreamRange,
pub declared_length: Option<u64>,
pub discovered_length: u64,
pub filters: Vec<PdfName>,
pub decode_params: Vec<DecodeParams>,
pub raw_source: Arc<[u8]>,
pub stream_keyword_crlf_compliant: bool,
pub endstream_keyword_eol_compliant: bool,
}Expand description
Parsed stream object with raw byte range metadata.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dictionary: DictionaryStream dictionary.
raw_range: StreamRangeRange of raw stream bytes within the input.
declared_length: Option<u64>Declared stream length.
discovered_length: u64Length discovered by scanning to endstream.
filters: Vec<PdfName>Stream filters as name objects.
decode_params: Vec<DecodeParams>Structured decode parameters aligned with filters.
raw_source: Arc<[u8]>Shared source bytes used for lazy stream decoding.
stream_keyword_crlf_compliant: boolWhether the stream keyword is followed by CRLF.
endstream_keyword_eol_compliant: boolWhether endstream is preceded by an EOL marker.
Implementations§
Source§impl StreamObject
impl StreamObject
Sourcepub fn decoded_bytes(
&self,
limits: &ResourceLimits,
) -> Result<Vec<u8>, ParseError>
pub fn decoded_bytes( &self, limits: &ResourceLimits, ) -> Result<Vec<u8>, ParseError>
Returns decoded stream bytes, enforcing max_stream_decode_bytes.
§Errors
Returns ParseError when a filter is unsupported, decompression fails,
or decoded output exceeds the configured limit.
Trait Implementations§
Source§impl Clone for StreamObject
impl Clone for StreamObject
Source§fn clone(&self) -> StreamObject
fn clone(&self) -> StreamObject
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 moreSource§impl Debug for StreamObject
impl Debug for StreamObject
Source§impl<'de> Deserialize<'de> for StreamObject
impl<'de> Deserialize<'de> for StreamObject
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StreamObject
impl PartialEq for StreamObject
Source§fn eq(&self, other: &StreamObject) -> bool
fn eq(&self, other: &StreamObject) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for StreamObject
impl Serialize for StreamObject
impl StructuralPartialEq for StreamObject
Auto Trait Implementations§
impl Freeze for StreamObject
impl RefUnwindSafe for StreamObject
impl Send for StreamObject
impl Sync for StreamObject
impl Unpin for StreamObject
impl UnsafeUnpin for StreamObject
impl UnwindSafe for StreamObject
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