pub struct Stream<I> {
pub info: StreamInfo<I>,
/* private fields */
}Expand description
Simple Stream object with only some additional entries from the stream dict (I).
Fields§
§info: StreamInfo<I>Implementations§
Source§impl<I: Object> Stream<I>
impl<I: Object> Stream<I>
pub fn from_stream(s: PdfStream, resolve: &impl Resolve) -> Result<Self>
Sourcepub fn new_with_filters(
i: I,
data: impl Into<Arc<[u8]>>,
filters: Vec<StreamFilter>,
) -> Stream<I>
pub fn new_with_filters( i: I, data: impl Into<Arc<[u8]>>, filters: Vec<StreamFilter>, ) -> Stream<I>
the data is not compressed. the specified filters are to be applied when compressing the data
pub fn new(i: I, data: impl Into<Arc<[u8]>>) -> Stream<I>
Sourcepub fn from_compressed(
i: I,
data: impl Into<Arc<[u8]>>,
filters: Vec<StreamFilter>,
) -> Stream<I>
pub fn from_compressed( i: I, data: impl Into<Arc<[u8]>>, filters: Vec<StreamFilter>, ) -> Stream<I>
the data is already compressed with the specified filters
pub fn data(&self, resolve: &impl Resolve) -> Result<Arc<[u8]>>
pub fn len(&self) -> usize
Source§impl<I: ObjectWrite> Stream<I>
impl<I: ObjectWrite> Stream<I>
pub fn to_pdf_stream(&self, update: &mut impl Updater) -> Result<PdfStream>
Methods from Deref<Target = StreamInfo<I>>§
pub fn get_filters(&self) -> &[StreamFilter]
Trait Implementations§
Source§impl<I> DataSize for Stream<I>where
StreamInfo<I>: DataSize,
impl<I> DataSize for Stream<I>where
StreamInfo<I>: DataSize,
Source§const IS_DYNAMIC: bool
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
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
fn estimate_heap_size(&self) -> usize
Estimates the size of heap memory taken up by this value. Read more
Source§impl<I: DeepClone> DeepClone for Stream<I>
impl<I: DeepClone> DeepClone for Stream<I>
fn deep_clone(&self, cloner: &mut impl Cloner) -> Result<Self>
Source§impl<I: Object> Deref for Stream<I>
impl<I: Object> Deref for Stream<I>
Source§type Target = StreamInfo<I>
type Target = StreamInfo<I>
The resulting type after dereferencing.
Source§fn deref(&self) -> &StreamInfo<I>
fn deref(&self) -> &StreamInfo<I>
Dereferences the value.
Source§impl<I: ObjectWrite> ObjectWrite for Stream<I>
impl<I: ObjectWrite> ObjectWrite for Stream<I>
Auto Trait Implementations§
impl<I> Freeze for Stream<I>where
I: Freeze,
impl<I> RefUnwindSafe for Stream<I>where
I: RefUnwindSafe,
impl<I> Send for Stream<I>where
I: Send,
impl<I> Sync for Stream<I>where
I: Sync,
impl<I> Unpin for Stream<I>where
I: Unpin,
impl<I> UnwindSafe for Stream<I>where
I: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more