pub struct RenderDataResources { /* private fields */ }Expand description
The resource table of a render data stream: operations refer to resources by handle.
Implementations§
Source§impl RenderDataResources
impl RenderDataResources
pub fn count(&self) -> usize
Sourcepub fn intern(&mut self, resource: Option<RenderDataResource>) -> i32
pub fn intern(&mut self, resource: Option<RenderDataResource>) -> i32
Recording path: dedupes by reference equality so a resource reused across many draws gets one slot.
Sourcepub fn append_deserialized(&mut self, resource: RenderDataResource) -> i32
pub fn append_deserialized(&mut self, resource: RenderDataResource) -> i32
Deserialize path: appends without deduping since the wire format is already deduped.
Sourcepub fn get(&self, handle: i32) -> Option<&RenderDataResource>
pub fn get(&self, handle: i32) -> Option<&RenderDataResource>
The resource of a handle; None for NULL_HANDLE.
pub fn iter(&self) -> impl Iterator<Item = &RenderDataResource>
pub fn brush(&self, handle: i32) -> Option<&dyn IBrush>
pub fn pen(&self, handle: i32) -> Option<&dyn IPen>
pub fn geometry_impl(&self, handle: i32) -> Option<Arc<dyn IGeometryImpl>>
pub fn glyph_run(&self, handle: i32) -> Option<&Arc<dyn IGlyphRunImpl>>
pub fn bitmap(&self, handle: i32) -> Option<Arc<SharedBitmapImpl>>
pub fn custom_draw_operation( &self, handle: i32, ) -> Option<&Arc<dyn ICustomDrawOperation>>
pub fn effect(&self, handle: i32) -> Option<&Arc<dyn IImmutableEffect>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RenderDataResources
impl !Send for RenderDataResources
impl !Sync for RenderDataResources
impl !UnwindSafe for RenderDataResources
impl Freeze for RenderDataResources
impl Unpin for RenderDataResources
impl UnsafeUnpin for RenderDataResources
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more