pub struct AsyncCopyInWriterOwned { /* private fields */ }Expand description
Owned-handle variant of AsyncCopyInWriter that holds an
Arc<Mutex<_>> to the underlying connection instead of a borrow.
Used by callers that need a 'static-lifetime writer — e.g. N-API
classes that can’t carry borrowed references across JS callbacks.
Semantics are identical to AsyncCopyInWriter; the only
difference is lifetime.
Implementations§
Source§impl AsyncCopyInWriterOwned
impl AsyncCopyInWriterOwned
Sourcepub async fn send(&mut self, data: &[u8]) -> Result<()>
pub async fn send(&mut self, data: &[u8]) -> Result<()>
Sends data to the server.
§Errors
Currently infallible — frame construction is pure. The Result
return type is preserved for forward compatibility.
Sourcepub async fn send_direct(&mut self, data: &[u8]) -> Result<()>
pub async fn send_direct(&mut self, data: &[u8]) -> Result<()>
Sourcepub async fn flush_stream(&mut self) -> Result<()>
pub async fn flush_stream(&mut self) -> Result<()>
Trait Implementations§
Source§impl Debug for AsyncCopyInWriterOwned
impl Debug for AsyncCopyInWriterOwned
Source§impl Drop for AsyncCopyInWriterOwned
impl Drop for AsyncCopyInWriterOwned
Auto Trait Implementations§
impl Freeze for AsyncCopyInWriterOwned
impl !RefUnwindSafe for AsyncCopyInWriterOwned
impl Send for AsyncCopyInWriterOwned
impl Sync for AsyncCopyInWriterOwned
impl Unpin for AsyncCopyInWriterOwned
impl UnsafeUnpin for AsyncCopyInWriterOwned
impl !UnwindSafe for AsyncCopyInWriterOwned
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request