pub struct AnnotObjectCtx<'doc> { /* private fields */ }Expand description
Immutable context for accessing AP-stream objects on a single annotation.
Obtained via EditDocument::annot_objects().
This type mirrors PageObjectCtx on the annotation side, providing the
same upstream-named methods for FPDFAnnot_*.
§Example
let ctx = doc.annot_objects(annot_id);
let count = ctx.get_object_count();
let obj = ctx.get_object(0);Implementations§
Source§impl<'doc> AnnotObjectCtx<'doc>
impl<'doc> AnnotObjectCtx<'doc>
Sourcepub fn get_object(&self, index: usize) -> Option<&'doc PageObject>
pub fn get_object(&self, index: usize) -> Option<&'doc PageObject>
Returns a reference to the AP-stream object at index.
Returns None if index is out of bounds or no objects have been
appended to this annotation.
ADR-019 T2 alias for FPDFAnnot_GetObject. Namespaced here to avoid
collision with the FPDFPage_GetObject alias on EditDocument.
See also PageObjectCtx::get_object() for the page side.
Sourcepub fn get_object_count(&self) -> usize
pub fn get_object_count(&self) -> usize
Returns the number of AP-stream objects for this annotation.
ADR-019 T2 alias for FPDFAnnot_GetObjectCount.
Auto Trait Implementations§
impl<'doc> Freeze for AnnotObjectCtx<'doc>
impl<'doc> !RefUnwindSafe for AnnotObjectCtx<'doc>
impl<'doc> Send for AnnotObjectCtx<'doc>
impl<'doc> Sync for AnnotObjectCtx<'doc>
impl<'doc> Unpin for AnnotObjectCtx<'doc>
impl<'doc> UnsafeUnpin for AnnotObjectCtx<'doc>
impl<'doc> !UnwindSafe for AnnotObjectCtx<'doc>
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