[−][src]Struct lopdf::Stream
Stream object Warning - all streams must be indirect objects, while the stream dictionary may be a direct object
Fields
dict: Dictionary
Associated stream dictionary
content: Vec<u8>
Contents of the stream in bytes
allows_compression: bool
Can the stream be compressed by the Document::compress()
function?
Font streams may not be compressed, for example
start_position: Option<usize>
Stream data's position in PDF file.
Implementations
impl Stream
[src]
pub fn new(dict: Dictionary, content: Vec<u8>) -> Stream
[src]
pub fn with_position(dict: Dictionary, position: usize) -> Stream
[src]
pub fn with_compression(self, allows_compression: bool) -> Stream
[src]
Default is that the stream may be compressed. On font streams, set this to false, otherwise the font will be corrupt
pub fn filter(&self) -> Result<String>
[src]
pub fn filters(&self) -> Result<Vec<String>>
[src]
pub fn set_content(&mut self, content: Vec<u8>)
[src]
pub fn set_plain_content(&mut self, content: Vec<u8>)
[src]
pub fn compress(&mut self) -> Result<()>
[src]
pub fn decompressed_content(&self) -> Result<Vec<u8>>
[src]
pub fn decompress(&mut self)
[src]
impl Stream
[src]
pub fn decode_content(&self) -> Result<Content>
[src]
Decode content after decoding all stream filters.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Stream
impl Send for Stream
impl Sync for Stream
impl Unpin for Stream
impl UnwindSafe for Stream
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,