pub struct InMemoryBroadcastChannelResource { /* private fields */ }
Trait Implementations
sourceimpl Resource for InMemoryBroadcastChannelResource
impl Resource for InMemoryBroadcastChannelResource
sourcefn name(&self) -> Cow<'_, str>
fn name(&self) -> Cow<'_, str>
Returns a string representation of the resource which is made available
to JavaScript code through
op_resources
. The default implementation
returns the Rust type name, but specific resource types may override this
trait method. Read moresourcefn read(
self: Rc<Self>,
buf: ZeroCopyBuf
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + 'static, Global>>
fn read(
self: Rc<Self>,
buf: ZeroCopyBuf
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + 'static, Global>>
Resources may implement
read()
to be a readable streamfn read_return(
self: Rc<Self>,
_buf: ZeroCopyBuf
) -> Pin<Box<dyn Future<Output = Result<(usize, ZeroCopyBuf), Error>> + 'static, Global>>
sourcefn write(
self: Rc<Self>,
_buf: ZeroCopyBuf
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + 'static, Global>>
fn write(
self: Rc<Self>,
_buf: ZeroCopyBuf
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + 'static, Global>>
Resources may implement
write()
to be a writable streamsourcefn shutdown(
self: Rc<Self>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
fn shutdown(
self: Rc<Self>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
Resources may implement
shutdown()
for graceful async shutdownsAuto Trait Implementations
impl !RefUnwindSafe for InMemoryBroadcastChannelResource
impl Send for InMemoryBroadcastChannelResource
impl Sync for InMemoryBroadcastChannelResource
impl Unpin for InMemoryBroadcastChannelResource
impl !UnwindSafe for InMemoryBroadcastChannelResource
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more