Struct PatternElt

Source
pub struct PatternElt<'buf>(pub Ptr<'buf, PatternEltData>);
Expand description

A single element of a Pattern.

This consists of an Object type, and a range of values. By convention, the values are all of the same Value variant (of a type determined by the object tag), but this is not actually enforced.

Tuple Fields§

§0: Ptr<'buf, PatternEltData>

Implementations§

Source§

impl<'buf> PatternElt<'buf>

Source

pub fn values( &self, ) -> Result<impl Iterator<Item = Result<Value<'buf>, Error>> + 'buf, Error>

An iterator over the values in this PatternElt.

Source

pub fn object(&self) -> Result<Object, Error>

The object tag, describing the font property that this PatternElt represents.

Source

pub fn data(&self) -> Result<PatternEltData, Error>

The serialized pattern elt data, straight from the fontconfig cache.

Auto Trait Implementations§

§

impl<'buf> Freeze for PatternElt<'buf>

§

impl<'buf> RefUnwindSafe for PatternElt<'buf>

§

impl<'buf> Send for PatternElt<'buf>

§

impl<'buf> Sync for PatternElt<'buf>

§

impl<'buf> Unpin for PatternElt<'buf>

§

impl<'buf> UnwindSafe for PatternElt<'buf>

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.