[][src]Struct pdf::object::Stream

pub struct Stream<I: Object = ()> {
    pub info: StreamInfo<I>,
    // some fields omitted
}

Simple Stream object with only some additional entries from the stream dict (I).

Fields

info: StreamInfo<I>

Implementations

impl<I: Object + Debug> Stream<I>[src]

pub fn from_stream(s: PdfStream, resolve: &impl Resolve) -> Result<Self>[src]

pub fn decode(&self) -> Result<Cow<'_, [u8]>>[src]

decode the data. does not store the result. The caller is responsible for caching the result

pub fn data(&self) -> Result<&[u8]>[src]

pub fn as_jpeg(&self) -> Option<&[u8]>[src]

If this is contains DCT encoded data, return the compressed data as is

Methods from Deref<Target = StreamInfo<I>>

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

Notable traits for &'_ mut [u8]

impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
[src]

Trait Implementations

impl<I: Object + Debug> Debug for Stream<I>[src]

impl<I: Object> Deref for Stream<I>[src]

type Target = StreamInfo<I>

The resulting type after dereferencing.

impl<I: Object + Debug> Object for Stream<I>[src]

fn serialize<W: Write>(&self, _: &mut W) -> Result<()>[src]

Write object as a byte stream

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

Convert primitive to Self

Auto Trait Implementations

impl<I> RefUnwindSafe for Stream<I> where
    I: RefUnwindSafe
[src]

impl<I> Send for Stream<I> where
    I: Send
[src]

impl<I = ()> !Sync for Stream<I>[src]

impl<I> Unpin for Stream<I> where
    I: Unpin
[src]

impl<I> UnwindSafe for Stream<I> where
    I: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AnyObject for T where
    T: Object + 'static, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.