pub struct ObjectStream {
pub objects: BTreeMap<ObjectId, Object>,
/* private fields */
}Fields§
§objects: BTreeMap<ObjectId, Object>Implementations§
Source§impl ObjectStream
impl ObjectStream
Sourcepub fn new(stream: &mut Stream) -> Result<ObjectStream>
pub fn new(stream: &mut Stream) -> Result<ObjectStream>
Parse an existing object stream
Sourcepub fn builder() -> ObjectStreamBuilder
pub fn builder() -> ObjectStreamBuilder
Create a builder for constructing new object streams
Sourcepub fn add_object(&mut self, id: ObjectId, obj: Object) -> Result<()>
pub fn add_object(&mut self, id: ObjectId, obj: Object) -> Result<()>
Add an object to the stream
Sourcepub fn object_count(&self) -> usize
pub fn object_count(&self) -> usize
Get the number of objects in the stream
Sourcepub fn build_stream_content(&self) -> Result<Vec<u8>>
pub fn build_stream_content(&self) -> Result<Vec<u8>>
Build the stream content in the format required by PDF spec
Sourcepub fn to_stream_object(&self) -> Result<Stream>
pub fn to_stream_object(&self) -> Result<Stream>
Convert to a Stream object ready for insertion into a PDF
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ObjectStream
impl RefUnwindSafe for ObjectStream
impl Send for ObjectStream
impl Sync for ObjectStream
impl Unpin for ObjectStream
impl UnwindSafe for ObjectStream
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> 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