Skip to main content

QPdfDictionary

Struct QPdfDictionary 

Source
pub struct QPdfDictionary { /* private fields */ }
Expand description

QPdfDictionary wraps a QPdfObject for dictionary-related operations

Implementations§

Source§

impl QPdfDictionary

Source

pub fn get_page_content_data(&self) -> Result<QPdfStreamData>

Get contents from the page object

Source

pub fn has(&self, key: &str) -> bool

Check whether there is a key in the dictionary

Source

pub fn get(&self, key: &str) -> Option<QPdfObject>

Get dictionary element for the specified key

Source

pub fn set<V: AsRef<QPdfObject>>(&self, key: &str, value: V)

Set dictionary element for the specified key

Source

pub fn remove(&self, key: &str)

Remove dictionary element

Source

pub fn keys(&self) -> Vec<String>

Return all keys from the dictionary

Trait Implementations§

Source§

impl AsRef<QPdfObject> for QPdfDictionary

Source§

fn as_ref(&self) -> &QPdfObject

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Display for QPdfDictionary

Source§

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

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

impl From<QPdfDictionary> for QPdfObject

Source§

fn from(dict: QPdfDictionary) -> Self

Converts to this type from the input type.
Source§

impl From<QPdfObject> for QPdfDictionary

Source§

fn from(obj: QPdfObject) -> Self

Converts to this type from the input type.
Source§

impl QPdfObjectLike for QPdfDictionary

Source§

fn as_object(&self) -> &QPdfObject

Return inner object
Source§

fn owner(&self) -> QPdf

Source§

fn get_type(&self) -> QPdfObjectType

Get this object type
Source§

fn to_binary(&self) -> String

‘Unparse’ the object converting it to a binary representation
Source§

fn is_operator(&self) -> bool

Return true if this is an operator object
Source§

fn is_scalar(&self) -> bool

Return true if this is a scalar object
Source§

fn is_indirect(&self) -> bool

Return true if this is an indirect object
Source§

fn as_bool(&self) -> bool

Get boolean value
Source§

fn as_name(&self) -> String

Get name value
Source§

fn as_string(&self) -> String

Get string value
Source§

fn as_binary_string(&self) -> Vec<u8> ⓘ

Get binary string value
Source§

fn get_id(&self) -> u32

Get ID of the indirect object
Source§

fn get_generation(&self) -> u32

Get generation of the indirect object
Source§

fn into_indirect(self) -> QPdfObject
where Self: Sized + Into<QPdfObject>,

Auto Trait Implementations§

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.