pub struct PdfArray(/* private fields */);Expand description
A PDF array
Arrays can contain any mix of PDF objects and can be nested.
Implementations§
Source§impl PdfArray
impl PdfArray
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates an array with the given capacity
Sourcepub fn push<T: Into<PdfObject>>(&mut self, object: T)
pub fn push<T: Into<PdfObject>>(&mut self, object: T)
Pushes an object onto the end of the array
Sourcepub fn get(&self, index: usize) -> Option<&PdfObject>
pub fn get(&self, index: usize) -> Option<&PdfObject>
Gets a reference to the object at the given index
Sourcepub fn get_mut(&mut self, index: usize) -> Option<&mut PdfObject>
pub fn get_mut(&mut self, index: usize) -> Option<&mut PdfObject>
Gets a mutable reference to the object at the given index
Sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut PdfObject>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut PdfObject>
Returns a mutable iterator over the objects
Sourcepub fn get_integer(&self, index: usize) -> Option<i64>
pub fn get_integer(&self, index: usize) -> Option<i64>
Gets an integer at the given index
Sourcepub fn get_reference(&self, index: usize) -> Option<PdfRef>
pub fn get_reference(&self, index: usize) -> Option<PdfRef>
Gets a reference at the given index
Trait Implementations§
Source§impl<T: Into<PdfObject>> FromIterator<T> for PdfArray
impl<T: Into<PdfObject>> FromIterator<T> for PdfArray
Source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<'a> IntoIterator for &'a PdfArray
impl<'a> IntoIterator for &'a PdfArray
Source§impl IntoIterator for PdfArray
impl IntoIterator for PdfArray
impl StructuralPartialEq for PdfArray
Auto Trait Implementations§
impl Freeze for PdfArray
impl RefUnwindSafe for PdfArray
impl Send for PdfArray
impl Sync for PdfArray
impl Unpin for PdfArray
impl UnsafeUnpin for PdfArray
impl UnwindSafe for PdfArray
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<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.