pub enum KindScratchHandle {
None,
LineDecoration(Index<LineDecorationScratch>),
NormalBorder(Index<NormalBorderScratch>),
ImageBorder(Index<ImageBorderScratch>),
Image(Index<ImageScratch>),
TextRun(Index<TextRunScratch>),
Picture(Index<PictureScratch>),
BackdropRender(Index<BackdropRenderScratch>),
}Expand description
Per-draw, per-kind scratch handle. Reaches the appropriate per-frame scratch entry for the drawn primitive’s kind. The variant matches the prim’s PrimitiveKind. None for kinds without per-frame scratch.
Variants§
None
LineDecoration(Index<LineDecorationScratch>)
NormalBorder(Index<NormalBorderScratch>)
ImageBorder(Index<ImageBorderScratch>)
Image(Index<ImageScratch>)
TextRun(Index<TextRunScratch>)
Picture(Index<PictureScratch>)
BackdropRender(Index<BackdropRenderScratch>)
Implementations§
Source§impl KindScratchHandle
impl KindScratchHandle
Sourcepub fn unwrap_line_decoration(&self) -> Index<LineDecorationScratch>
pub fn unwrap_line_decoration(&self) -> Index<LineDecorationScratch>
Extract the LineDecoration scratch index. Panics if the variant doesn’t match — readers in the LineDecoration arm of the PrimitiveKind match know the variant by construction.
pub fn unwrap_normal_border(&self) -> Index<NormalBorderScratch>
pub fn unwrap_image_border(&self) -> Index<ImageBorderScratch>
pub fn unwrap_image(&self) -> Index<ImageScratch>
pub fn unwrap_text_run(&self) -> Index<TextRunScratch>
pub fn unwrap_picture(&self) -> Index<PictureScratch>
pub fn unwrap_backdrop_render(&self) -> Index<BackdropRenderScratch>
Trait Implementations§
Source§impl Clone for KindScratchHandle
impl Clone for KindScratchHandle
Source§fn clone(&self) -> KindScratchHandle
fn clone(&self) -> KindScratchHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KindScratchHandle
impl Debug for KindScratchHandle
Source§impl Serialize for KindScratchHandle
impl Serialize for KindScratchHandle
impl Copy for KindScratchHandle
Auto Trait Implementations§
impl Freeze for KindScratchHandle
impl RefUnwindSafe for KindScratchHandle
impl Send for KindScratchHandle
impl Sync for KindScratchHandle
impl Unpin for KindScratchHandle
impl UnsafeUnpin for KindScratchHandle
impl UnwindSafe for KindScratchHandle
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