pub struct GroupWriter {
pub info: Arc<GroupInfo>,
/* private fields */
}
Expand description
Used to write data to a stream and notify readers.
Fields§
§info: Arc<GroupInfo>
Implementations§
Source§impl GroupWriter
impl GroupWriter
Sourcepub fn write(&mut self, payload: Bytes) -> Result<(), ServeError>
pub fn write(&mut self, payload: Bytes) -> Result<(), ServeError>
Create the next object ID with the given payload.
Sourcepub fn create(&mut self, size: usize) -> Result<GroupObjectWriter, ServeError>
pub fn create(&mut self, size: usize) -> Result<GroupObjectWriter, ServeError>
Write an object over multiple writes.
BAD STUFF will happen if the size is wrong; this is an advanced feature.
Sourcepub fn close(self, err: ServeError) -> Result<(), ServeError>
pub fn close(self, err: ServeError) -> Result<(), ServeError>
Close the stream with an error.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GroupWriter
impl RefUnwindSafe for GroupWriter
impl Send for GroupWriter
impl Sync for GroupWriter
impl Unpin for GroupWriter
impl UnwindSafe for GroupWriter
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