AttributeList

Struct AttributeList 

Source
pub struct AttributeList<'a>(/* private fields */);

Implementations§

Source§

impl<'a> AttributeList<'a>

Attributes for nodes in the PDF tree.

Each attribute must have an owner (e.g. “Layout”, “List”, “Table”, etc) and an attribute name (e.g. “BBox”, “RowSpan”, etc.) from PDF32000_2008 14.8.5, and then a value of the proper type according to the spec.

Parameters of type CString will not be copied and the pointers must remain valid until crate::Document::close or crate::Document::abort is called. Names are expected to be constants and are taken as CString. Parameters not taken as CString will be copied.

Source

pub fn append_int( &mut self, owner: &'a CString, name: &'a CString, value: i32, ) -> &mut Self

Source

pub fn append_float( &mut self, owner: &'a CString, name: &'a CString, value: f32, ) -> &mut Self

Source

pub fn append_float_array( &mut self, owner: &'a CString, name: &'a CString, value: &[f32], ) -> &mut Self

Source

pub fn append_name( &mut self, owner: &'a CString, name: &'a CString, value: &'a CString, ) -> &mut Self

Source

pub fn append_text_string( &mut self, owner: &'a CString, name: &'a CString, value: &'a CString, ) -> &mut Self

Source

pub fn append_node_id_array( &mut self, owner: &'a CString, name: &'a CString, node_ids: &[i32], ) -> &mut Self

Trait Implementations§

Source§

impl Debug for AttributeList<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AttributeList<'_>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Send for AttributeList<'_>

Source§

impl Sync for AttributeList<'_>

Auto Trait Implementations§

§

impl<'a> !Freeze for AttributeList<'a>

§

impl<'a> !RefUnwindSafe for AttributeList<'a>

§

impl<'a> Unpin for AttributeList<'a>

§

impl<'a> UnwindSafe for AttributeList<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.