skia_safe::pdf

Struct StructureElementNode

Source
pub struct StructureElementNode(/* private fields */);

Implementations§

Source§

impl StructureElementNode

A node in a PDF structure tree, giving a semantic representation of the content. Each node ID is associated with content by passing the crate::Canvas and node ID to set_node_id() when drawing. NodeIDs should be unique within each tree.

Source

pub fn new(type_string: impl AsRef<str>) -> Self

Source

pub fn set_type_string(&mut self, type_string: impl AsRef<str>) -> &mut Self

Source

pub fn type_string(&self) -> &str

Source

pub fn set_child_vector( &mut self, child_vector: Vec<StructureElementNode>, ) -> &mut Self

Source

pub fn append_child(&mut self, node: StructureElementNode) -> &mut Self

Source

pub fn child_vector(&self) -> &[StructureElementNode]

Source

pub fn set_node_id(&mut self, node_id: i32) -> &mut Self

Source

pub fn node_id(&self) -> i32

Source

pub fn attributes(&self) -> &AttributeList

Source

pub fn attributes_mut(&mut self) -> &mut AttributeList

Source

pub fn set_alt(&mut self, alt: impl AsRef<str>) -> &mut Self

Source

pub fn alt(&self) -> &str

Source

pub fn set_lang(&mut self, lang: impl AsRef<str>) -> &mut Self

Source

pub fn lang(&self) -> &str

Trait Implementations§

Source§

impl Debug for StructureElementNode

Source§

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

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

impl Default for StructureElementNode

Source§

fn default() -> Self

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

impl Drop for StructureElementNode

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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, 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.