Struct pdf::object::StreamInfo

source ·
pub struct StreamInfo<I> {
    pub filters: Vec<StreamFilter>,
    pub file: Option<FileSpec>,
    pub file_filters: Vec<StreamFilter>,
    pub info: I,
}
Expand description

General stream type. I is the additional information to be read from the stream dict.

Fields§

§filters: Vec<StreamFilter>

Filters that the data is currently encoded with (corresponds to both /Filter and /DecodeParms in the PDF specs), constructed in from_primitive().

§file: Option<FileSpec>

Eventual file containing the stream contentst

§file_filters: Vec<StreamFilter>

Filters to apply to external file specified in file.

§info: I

Implementations§

source§

impl<T> StreamInfo<T>

source

pub fn get_filters(&self) -> &[StreamFilter]

Trait Implementations§

source§

impl<I: Clone> Clone for StreamInfo<I>

source§

fn clone(&self) -> StreamInfo<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<I> DataSize for StreamInfo<I>where I: DataSize,

source§

const IS_DYNAMIC: bool = _

If true, the type has a heap size that can vary at runtime, depending on the actual value.
source§

const STATIC_HEAP_SIZE: usize = _

The amount of space a value of the type always occupies. If IS_DYNAMIC is false, this is the total amount of heap memory occupied by the value. Otherwise this is a lower bound.
source§

fn estimate_heap_size(&self) -> usize

Estimates the size of heap memory taken up by this value. Read more
source§

impl<I: Debug> Debug for StreamInfo<I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I: DeepClone> DeepClone for StreamInfo<I>

source§

fn deep_clone(&self, cloner: &mut impl Cloner) -> Result<Self>

source§

impl<I: Default> Default for StreamInfo<I>

source§

fn default() -> StreamInfo<I>

Returns the “default value” for a type. Read more
source§

impl<I> Deref for StreamInfo<I>

§

type Target = I

The resulting type after dereferencing.
source§

fn deref(&self) -> &I

Dereferences the value.
source§

impl<T: Object> Object for StreamInfo<T>

source§

fn from_primitive(p: Primitive, resolve: &impl Resolve) -> Result<Self>

Convert primitive to Self

Auto Trait Implementations§

§

impl<I> RefUnwindSafe for StreamInfo<I>where I: RefUnwindSafe,

§

impl<I> Send for StreamInfo<I>where I: Send,

§

impl<I> Sync for StreamInfo<I>where I: Sync,

§

impl<I> Unpin for StreamInfo<I>where I: Unpin,

§

impl<I> UnwindSafe for StreamInfo<I>where I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Backend for Twhere T: Deref<Target = [u8]>,

source§

fn read<R>(&self, range: R) -> Result<&[u8], PdfError>where R: IndexRange,

source§

fn len(&self) -> usize

source§

fn is_empty(&self) -> bool

source§

fn locate_start_offset(&self) -> Result<usize>

Returns the offset of the beginning of the file, i.e., where the %PDF-1.5 header is. (currently only used internally!)
source§

fn locate_xref_offset(&self) -> Result<usize>

Returns the value of startxref (currently only used internally!)
source§

fn read_xref_table_and_trailer( &self, start_offset: usize, resolve: &impl Resolve ) -> Result<(XRefTable, Dictionary)>

Used internally by File, but could also be useful for applications that want to look at the raw PDF objects.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.