#[non_exhaustive]pub struct StreamHead {
pub id: ObjRef,
pub dict: Dict,
pub data_start: usize,
pub declared_length: Option<i64>,
}Expand description
A stream’s header and dictionary, before its data is read (Parser::indirect_head).
Added in 0.2.0.
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.id: ObjRefThe object’s number and generation.
dict: DictThe stream dictionary.
data_start: usizeOffset of the first data byte (after stream and its EOL).
declared_length: Option<i64>/Length as declared (resolved when indirect); None when missing or unresolvable.
Implementations§
Source§impl StreamHead
impl StreamHead
Sourcepub fn declared_end(&self) -> Option<usize>
pub fn declared_end(&self) -> Option<usize>
Where the data ends if /Length is right (None when it is missing, negative or
overflows).
Added in 0.2.0.
Sourcepub fn into_object(
self,
data: Vec<u8>,
length_recovered: bool,
) -> IndirectObject
pub fn into_object( self, data: Vec<u8>, length_recovered: bool, ) -> IndirectObject
The finished object: this stream with data; length_recovered when the extent was
found by scanning for endstream rather than from /Length.
Added in 0.2.0.
Trait Implementations§
Source§impl Clone for StreamHead
impl Clone for StreamHead
Source§impl Debug for StreamHead
impl Debug for StreamHead
Source§impl PartialEq for StreamHead
impl PartialEq for StreamHead
impl StructuralPartialEq for StreamHead
Auto Trait Implementations§
impl Forget for StreamHead
impl Freeze for StreamHead
impl Move for StreamHead
impl RefUnwindSafe for StreamHead
impl Send for StreamHead
impl Sync for StreamHead
impl Unpin for StreamHead
impl UnsafeUnpin for StreamHead
impl UnwindSafe for StreamHead
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