pub struct FrameWriter<'a> { /* private fields */ }Expand description
Writes a frame record; FrameWriter::finish fills in its length.
Implementations§
Source§impl<'a> FrameWriter<'a>
impl<'a> FrameWriter<'a>
Sourcepub fn new(
out: &'a mut Vec<u8>,
(surface, sequence): (SurfaceId, u64),
(width, height): (u32, u32),
base_color: [f32; 4],
full: bool,
) -> Self
pub fn new( out: &'a mut Vec<u8>, (surface, sequence): (SurfaceId, u64), (width, height): (u32, u32), base_color: [f32; 4], full: bool, ) -> Self
Start a record for surface at the end of out.
Sourcepub fn scroll_copies(&mut self, copies: &[ScrollCopy]) -> Result<(), WireError>
pub fn scroll_copies(&mut self, copies: &[ScrollCopy]) -> Result<(), WireError>
The copies a scroll keeps, in order.
Sourcepub fn layer(
&mut self,
layer: &LayerUpdate,
ids: &mut dyn ResourceIds,
) -> Result<(), WireError>
pub fn layer( &mut self, layer: &LayerUpdate, ids: &mut dyn ResourceIds, ) -> Result<(), WireError>
One layer’s change; its content’s resources are registered through
ids.
Sourcepub fn content(
&mut self,
id: LayerId,
content: &Encoding,
ids: &mut dyn ResourceIds,
) -> Result<(), WireError>
pub fn content( &mut self, id: LayerId, content: &Encoding, ids: &mut dyn ResourceIds, ) -> Result<(), WireError>
Layer id’s new content, untransformed, opaque, unclipped: what a
toolkit frame sends for its root layer, without copying the encoding.
Sourcepub fn order(&mut self, order: &[LayerId]) -> Result<(), WireError>
pub fn order(&mut self, order: &[LayerId]) -> Result<(), WireError>
The order layers draw in, bottom first.
Sourcepub fn backdrop(
&mut self,
backdrop: &Backdrop,
ids: &mut dyn ResourceIds,
) -> Result<(), WireError>
pub fn backdrop( &mut self, backdrop: &Backdrop, ids: &mut dyn ResourceIds, ) -> Result<(), WireError>
A floating surface’s backdrop.
Auto Trait Implementations§
impl<'a> !UnwindSafe for FrameWriter<'a>
impl<'a> Forget for FrameWriter<'a>
impl<'a> Freeze for FrameWriter<'a>
impl<'a> Move for FrameWriter<'a>
impl<'a> RefUnwindSafe for FrameWriter<'a>
impl<'a> Send for FrameWriter<'a>
impl<'a> Sync for FrameWriter<'a>
impl<'a> Unpin for FrameWriter<'a>
impl<'a> UnsafeUnpin for FrameWriter<'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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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