pub struct BatchStreamWriter<'a> { /* private fields */ }Expand description
Writes changes into the streams of a batch.
Implementations§
Source§impl<'a> BatchStreamWriter<'a>
impl<'a> BatchStreamWriter<'a>
pub fn new(output: &'a mut BatchStreamData) -> Self
Sourcepub fn write<T: BatchValue>(&mut self, item: T)
pub fn write<T: BatchValue>(&mut self, item: T)
Writes a plain value to the value stream.
Sourcepub fn write_bytes(&mut self, data: &[u8])
pub fn write_bytes(&mut self, data: &[u8])
Writes raw bytes to the value stream (C# Write(ReadOnlySpan<byte>)).
Sourcepub fn write_object(&mut self, item: BatchObject)
pub fn write_object(&mut self, item: BatchObject)
Writes an object slot to the object stream.
Sourcepub fn write_server_object(&mut self, id: Option<ServerObjectId>)
pub fn write_server_object(&mut self, id: Option<ServerObjectId>)
Writes a reference to a server object (or null).
Sourcepub fn write_value<T: Any + Send>(&mut self, item: Option<T>)
pub fn write_value<T: Any + Send>(&mut self, item: Option<T>)
Writes a payload value (or null) to the object stream.
Sourcepub fn write_resource<T: ?Sized + BatchResourceValue>(
&mut self,
item: Option<BatchResource<T>>,
)
pub fn write_resource<T: ?Sized + BatchResourceValue>( &mut self, item: Option<BatchResource<T>>, )
Writes a resource reference (or null) to the object stream.
Sourcepub fn write_marker(&mut self, marker: BatchMarker)
pub fn write_marker(&mut self, marker: BatchMarker)
Writes a marker to the object stream.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BatchStreamWriter<'a>
impl<'a> !Sync for BatchStreamWriter<'a>
impl<'a> !UnwindSafe for BatchStreamWriter<'a>
impl<'a> Freeze for BatchStreamWriter<'a>
impl<'a> Send for BatchStreamWriter<'a>
impl<'a> Unpin for BatchStreamWriter<'a>
impl<'a> UnsafeUnpin for BatchStreamWriter<'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> 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