pub struct Resources<'a> { /* private fields */ }Expand description
A structure keeping track of the resources of a page.
Implementations§
Source§impl<'a> Resources<'a>
impl<'a> Resources<'a>
Sourcepub fn from_parent(resources: Dict<'a>, parent: Resources<'a>) -> Resources<'a>
pub fn from_parent(resources: Dict<'a>, parent: Resources<'a>) -> Resources<'a>
Create a new Resources object from a dictionary with a parent.
Sourcepub fn new(
resources: Dict<'a>,
parent: Option<Resources<'a>>,
xref: &'a XRef,
) -> Resources<'a>
pub fn new( resources: Dict<'a>, parent: Option<Resources<'a>>, xref: &'a XRef, ) -> Resources<'a>
Create a new Resources object.
Sourcepub fn resolve_ref<T: ObjectLike<'a>>(&self, ref_: ObjRef) -> Option<T>
pub fn resolve_ref<T: ObjectLike<'a>>(&self, ref_: ObjRef) -> Option<T>
Resolve an object reference to an object.
Sourcepub fn get_ext_g_state<U>(
&self,
name: &Name<'_>,
cache: Box<dyn FnMut(ObjRef) -> Option<U> + '_>,
resolve: Box<dyn FnMut(Dict<'a>) -> Option<U> + '_>,
) -> Option<U>
pub fn get_ext_g_state<U>( &self, name: &Name<'_>, cache: Box<dyn FnMut(ObjRef) -> Option<U> + '_>, resolve: Box<dyn FnMut(Dict<'a>) -> Option<U> + '_>, ) -> Option<U>
Get an external graphics state by name.
Sourcepub fn get_color_space<U>(
&self,
name: &Name<'_>,
cache: Box<dyn FnMut(ObjRef) -> Option<U> + '_>,
resolve: Box<dyn FnMut(Object<'a>) -> Option<U> + '_>,
) -> Option<U>
pub fn get_color_space<U>( &self, name: &Name<'_>, cache: Box<dyn FnMut(ObjRef) -> Option<U> + '_>, resolve: Box<dyn FnMut(Object<'a>) -> Option<U> + '_>, ) -> Option<U>
Get a color space by name.
Sourcepub fn get_font<U>(
&self,
name: &Name<'_>,
cache: Box<dyn FnMut(ObjRef) -> Option<U> + '_>,
resolve: Box<dyn FnMut(Dict<'a>) -> Option<U> + '_>,
) -> Option<U>
pub fn get_font<U>( &self, name: &Name<'_>, cache: Box<dyn FnMut(ObjRef) -> Option<U> + '_>, resolve: Box<dyn FnMut(Dict<'a>) -> Option<U> + '_>, ) -> Option<U>
Get a font by name.
Sourcepub fn get_pattern<U>(
&self,
name: &Name<'_>,
cache: Box<dyn FnMut(ObjRef) -> Option<U> + '_>,
resolve: Box<dyn FnMut(Object<'a>) -> Option<U> + '_>,
) -> Option<U>
pub fn get_pattern<U>( &self, name: &Name<'_>, cache: Box<dyn FnMut(ObjRef) -> Option<U> + '_>, resolve: Box<dyn FnMut(Object<'a>) -> Option<U> + '_>, ) -> Option<U>
Get a pattern by name.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Resources<'a>
impl<'a> !RefUnwindSafe for Resources<'a>
impl<'a> Send for Resources<'a>
impl<'a> Sync for Resources<'a>
impl<'a> Unpin for Resources<'a>
impl<'a> !UnwindSafe for Resources<'a>
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more