pub struct FrameBuilder { /* private fields */ }Expand description
Builds one frame. Add despawns in any order; add spawns and updates in ascending id order.
Implementations§
Source§impl FrameBuilder
impl FrameBuilder
pub fn new(full: bool, precision: f32) -> Self
pub fn despawn(&mut self, id: EntityId)
Sourcepub fn spawn<'a>(
&mut self,
id: EntityId,
q: [i64; 3],
components: impl ExactSizeIterator<Item = (ComponentId, &'a [u8])>,
)
pub fn spawn<'a>( &mut self, id: EntityId, q: [i64; 3], components: impl ExactSizeIterator<Item = (ComponentId, &'a [u8])>, )
Add a spawn. Ids must ascend across calls.
Sourcepub fn update(&mut self, id: EntityId, body: &[u8])
pub fn update(&mut self, id: EntityId, body: &[u8])
Add an update with a body from encode_update_body. Ids must
ascend across calls.
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameBuilder
impl RefUnwindSafe for FrameBuilder
impl Send for FrameBuilder
impl Sync for FrameBuilder
impl Unpin for FrameBuilder
impl UnsafeUnpin for FrameBuilder
impl UnwindSafe for FrameBuilder
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