pub struct Resources<'a> {
pub ext_g_states: Dict<'a>,
pub fonts: Dict<'a>,
pub properties: Dict<'a>,
pub color_spaces: Dict<'a>,
pub x_objects: Dict<'a>,
pub patterns: Dict<'a>,
pub shadings: Dict<'a>,
/* private fields */
}Expand description
A structure keeping track of the resources of a page.
Fields§
§ext_g_states: Dict<'a>The raw dictionary of external graphics states.
fonts: Dict<'a>The raw dictionary of fonts.
properties: Dict<'a>The raw dictionary of properties.
color_spaces: Dict<'a>The raw dictionary of color spaces.
x_objects: Dict<'a>The raw dictionary of x objects.
patterns: Dict<'a>The raw dictionary of patterns.
shadings: Dict<'a>The raw dictionary of shadings.
Implementations§
Source§impl<'a> Resources<'a>
impl<'a> Resources<'a>
Sourcepub fn from_parent(resources: Dict<'a>, parent: Self) -> Self
pub fn from_parent(resources: Dict<'a>, parent: Self) -> Self
Create a new Resources object from a dictionary with a parent.
Sourcepub fn get_ext_g_state(&self, name: Name<'_>) -> Option<Dict<'a>>
pub fn get_ext_g_state(&self, name: Name<'_>) -> Option<Dict<'a>>
Get an external graphics state by name.
Sourcepub fn get_color_space(&self, name: Name<'_>) -> Option<Object<'a>>
pub fn get_color_space(&self, name: Name<'_>) -> Option<Object<'a>>
Get a color space by name.
Sourcepub fn get_pattern(&self, name: Name<'_>) -> Option<Object<'a>>
pub fn get_pattern(&self, name: Name<'_>) -> Option<Object<'a>>
Get a pattern by name.
Sourcepub fn get_x_object(&self, name: Name<'_>) -> Option<Stream<'a>>
pub fn get_x_object(&self, name: Name<'_>) -> Option<Stream<'a>>
Get an x object by name.
Sourcepub fn get_shading(&self, name: Name<'_>) -> Option<Object<'a>>
pub fn get_shading(&self, name: Name<'_>) -> Option<Object<'a>>
Get a shading 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