pub struct Store { /* private fields */ }Expand description
Base file plus overlay.
Implementations§
Source§impl Store
impl Store
Sourcepub fn set_trailer_entry(&mut self, key: &str, value: Object)
pub fn set_trailer_entry(&mut self, key: &str, value: Object)
Sets a trailer entry (/Info, /Root, /ID). null removes it.
Sourcepub fn is_modified(&self) -> bool
pub fn is_modified(&self) -> bool
Whether anything was changed.
Sourcepub fn get(&self, id: ObjId) -> Result<Arc<Object>, Error>
pub fn get(&self, id: ObjId) -> Result<Arc<Object>, Error>
The object id, from the overlay or the base.
Sourcepub fn resolve(&self, object: &Object) -> Object
pub fn resolve(&self, object: &Object) -> Object
Follows references until a direct object; missing objects and overlong
chains resolve to null.
Sourcepub fn resolve_dict(&self, object: &Object) -> Option<Dict>
pub fn resolve_dict(&self, object: &Object) -> Option<Dict>
Resolves object as a dictionary (or a stream’s dictionary).
Sourcepub fn decode_stream(&self, stream: &Stream) -> Result<Decoded, Error>
pub fn decode_stream(&self, stream: &Stream) -> Result<Decoded, Error>
Decodes a stream through its filters, resolving indirect filter parameters through the overlay.
Sourcepub fn object_ids(&self) -> Vec<ObjId>
pub fn object_ids(&self) -> Vec<ObjId>
Every live object id, base and overlay, in order.
Sourcepub fn add(&mut self, object: Object) -> Result<ObjId, Error>
pub fn add(&mut self, object: Object) -> Result<ObjId, Error>
Adds a new object and returns its id.
Sourcepub fn allocate(&mut self) -> Result<ObjId, Error>
pub fn allocate(&mut self) -> Result<ObjId, Error>
Reserves a new object number (generation 0) without an object yet;
Store::set fills it. Used to break cycles while copying.
Sourcepub fn next_number(&self) -> u32
pub fn next_number(&self) -> u32
The next object number that would be allocated.
Sourcepub fn strictness(&self) -> Strictness
pub fn strictness(&self) -> Strictness
Whether repairs are allowed.
Sourcepub fn diagnostics_sink(&self) -> &Diagnostics
pub fn diagnostics_sink(&self) -> &Diagnostics
Where repairs are recorded.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Store
impl !RefUnwindSafe for Store
impl !UnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
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