pub struct RenderDataWriter { /* private fields */ }Expand description
Appends the operations of a render data stream to a byte buffer.
Upstream blits unmanaged structs into a pooled array; the port encodes
values with BatchValue (fields in declaration order, little-endian),
the encoding of the batch transport, so that no unsafe is needed.
Implementations§
Source§impl RenderDataWriter
impl RenderDataWriter
pub fn new() -> Self
Sourcepub fn reserve(&mut self, count: usize) -> &mut [u8] ⓘ
pub fn reserve(&mut self, count: usize) -> &mut [u8] ⓘ
Appends count bytes for the caller to fill.
Sourcepub fn write<T: BatchValue>(&mut self, value: T)
pub fn write<T: BatchValue>(&mut self, value: T)
Appends a value.
Sourcepub fn write_opcode(&mut self, opcode: RenderDataOpcode)
pub fn write_opcode(&mut self, opcode: RenderDataOpcode)
Appends an opcode.
Sourcepub fn write_payload<T: IRenderDataPayload>(&mut self, payload: T)
pub fn write_payload<T: IRenderDataPayload>(&mut self, payload: T)
Appends the opcode of a payload, then the payload.
Trait Implementations§
Source§impl Debug for RenderDataWriter
impl Debug for RenderDataWriter
Auto Trait Implementations§
impl Freeze for RenderDataWriter
impl RefUnwindSafe for RenderDataWriter
impl Send for RenderDataWriter
impl Sync for RenderDataWriter
impl Unpin for RenderDataWriter
impl UnsafeUnpin for RenderDataWriter
impl UnwindSafe for RenderDataWriter
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