pub struct ChunkStream { /* private fields */ }Expand description
Active /chunks/stream upload session. Open one via
FileApi::chunks_stream.
Each Self::send_chunk sends one binary frame and awaits the
server’s 0x00 ack before returning. The session remains usable
until Self::close (or until dropped).
Implementations§
Source§impl ChunkStream
impl ChunkStream
Sourcepub async fn send_chunk(&mut self, chunk: impl Into<Bytes>) -> Result<(), Error>
pub async fn send_chunk(&mut self, chunk: impl Into<Bytes>) -> Result<(), Error>
Send one chunk (span || payload framing per Bee’s content-
addressed chunk format) and await the server ack.
Returns Error::Argument if the websocket has already been
closed or if the server replied with anything other than the
single-byte 0 ack.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChunkStream
impl !RefUnwindSafe for ChunkStream
impl Send for ChunkStream
impl Sync for ChunkStream
impl Unpin for ChunkStream
impl UnsafeUnpin for ChunkStream
impl !UnwindSafe for ChunkStream
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