pub enum DrawMemory<'a> {
Scratch,
Buffer(&'a mut [u8]),
}Expand description
Working memory for drawing an outline.
A glyf outline and a VARC composite need working memory to draw; a
charstring needs none. The size an outline needs is given by its
required_memory_size.
Variants§
Scratch
Short-lived scratch memory of the size the outline needs, which may be allocated on the heap for a large glyph.
Buffer(&'a mut [u8])
Memory supplied by the caller, of at least the size the outline needs.
Trait Implementations§
Source§impl<'a> Debug for DrawMemory<'a>
impl<'a> Debug for DrawMemory<'a>
Source§impl<'a> Default for DrawMemory<'a>
impl<'a> Default for DrawMemory<'a>
Source§fn default() -> DrawMemory<'a>
fn default() -> DrawMemory<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> From<&'a mut [u8]> for DrawMemory<'a>
impl<'a> From<&'a mut [u8]> for DrawMemory<'a>
Source§fn from(buffer: &'a mut [u8]) -> DrawMemory<'a>
fn from(buffer: &'a mut [u8]) -> DrawMemory<'a>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> !UnwindSafe for DrawMemory<'a>
impl<'a> Freeze for DrawMemory<'a>
impl<'a> RefUnwindSafe for DrawMemory<'a>
impl<'a> Send for DrawMemory<'a>
impl<'a> Sync for DrawMemory<'a>
impl<'a> Unpin for DrawMemory<'a>
impl<'a> UnsafeUnpin for DrawMemory<'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