pub type OutChan = Box<dyn AsFramedWriter, Global>;
Expand description

Tx backend write stream type.

Aliased Type§

struct OutChan(/* private fields */);

Trait Implementations§

§

impl<T> AsyncBufRead for Box<T, Global>where T: AsyncBufRead + Unpin + ?Sized,

§

fn poll_fill_buf( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_> ) -> Poll<Result<&[u8], Error>>

Attempt to return the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more
§

fn consume(self: Pin<&mut Box<T, Global>>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer, so they should no longer be returned in calls to poll_read. Read more
source§

impl<T> AsyncBufRead for Box<T, Global>where T: AsyncBufRead + Unpin + ?Sized,

source§

fn poll_fill_buf( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_> ) -> Poll<Result<&[u8], Error>>

Attempts to return the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more
source§

fn consume(self: Pin<&mut Box<T, Global>>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer, so they should no longer be returned in calls to poll_read. Read more
§

impl<T> AsyncRead for Box<T, Global>where T: AsyncRead + Unpin + ?Sized,

§

fn poll_read( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_>, buf: &mut [u8] ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into buf. Read more
§

fn poll_read_vectored( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>] ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more
source§

impl<T> AsyncRead for Box<T, Global>where T: AsyncRead + Unpin + ?Sized,

source§

fn poll_read( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_> ) -> Poll<Result<(), Error>>

Attempts to read from the AsyncRead into buf. Read more
§

impl<T> AsyncSeek for Box<T, Global>where T: AsyncSeek + Unpin + ?Sized,

§

fn poll_seek( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_>, pos: SeekFrom ) -> Poll<Result<u64, Error>>

Attempt to seek to an offset, in bytes, in a stream. Read more
source§

impl<T> AsyncSeek for Box<T, Global>where T: AsyncSeek + Unpin + ?Sized,

source§

fn start_seek( self: Pin<&mut Box<T, Global>>, pos: SeekFrom ) -> Result<(), Error>

Attempts to seek to an offset, in bytes, in a stream. Read more
source§

fn poll_complete( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_> ) -> Poll<Result<u64, Error>>

Waits for a seek operation to complete. Read more
§

impl<T> AsyncWrite for Box<T, Global>where T: AsyncWrite + Unpin + ?Sized,

§

fn poll_write( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_>, buf: &[u8] ) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the object. Read more
§

fn poll_write_vectored( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>] ) -> Poll<Result<usize, Error>>

Attempt to write bytes from bufs into the object using vectored IO operations. Read more
§

fn poll_flush( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_> ) -> Poll<Result<(), Error>>

Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
§

fn poll_close( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_> ) -> Poll<Result<(), Error>>

Attempt to close the object. Read more
source§

impl<T> AsyncWrite for Box<T, Global>where T: AsyncWrite + Unpin + ?Sized,

source§

fn poll_write( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_>, buf: &[u8] ) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the object. Read more
source§

fn poll_write_vectored( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>] ) -> Poll<Result<usize, Error>>

Like poll_write, except that it writes from a slice of buffers. Read more
source§

fn is_write_vectored(&self) -> bool

Determines if this writer has an efficient poll_write_vectored implementation. Read more
source§

fn poll_flush( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_> ) -> Poll<Result<(), Error>>

Attempts to flush the object, ensuring that any buffered data reach their destination. Read more
source§

fn poll_shutdown( self: Pin<&mut Box<T, Global>>, cx: &mut Context<'_> ) -> Poll<Result<(), Error>>

Initiates or attempts to shut down this writer, returning success when the I/O connection has completely shut down. Read more
1.0.0 · source§

impl<T, A> Clone for Box<T, A>where T: Clone, A: Allocator + Clone,

source§

fn clone(&self) -> Box<T, A>

Returns a new box with a clone() of this box’s contents.

Examples
let x = Box::new(5);
let y = x.clone();

// The value is the same
assert_eq!(x, y);

// But they are unique objects
assert_ne!(&*x as *const i32, &*y as *const i32);
source§

fn clone_from(&mut self, source: &Box<T, A>)

Copies source’s contents into self without creating a new allocation.

Examples
let x = Box::new(5);
let mut y = Box::new(10);
let yp: *const i32 = &*y;

y.clone_from(&x);

// The value is the same
assert_eq!(x, y);

// And no allocation occurred
assert_eq!(yp, &*y);
1.0.0 · source§

impl<T, A> Debug for Box<T, A>where T: Debug + ?Sized, A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
1.0.0 · source§

impl<T> Default for Box<T, Global>where T: Default,

source§

fn default() -> Box<T, Global>

Creates a Box<T>, with the Default value for T.

1.0.0 · source§

impl<T, A> Deref for Box<T, A>where A: Allocator, T: ?Sized,

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl<'de, T> Deserialize<'de> for Box<T, Global>where T: Deserialize<'de>,

source§

fn deserialize<D>( deserializer: D ) -> Result<Box<T, Global>, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
1.0.0 · source§

impl<T, A> Display for Box<T, A>where T: Display + ?Sized, A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
1.8.0 · source§

impl<T> Error for Box<T, Global>where T: Error,

source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
1.6.0 · source§

impl<T> From<T> for Box<T, Global>

source§

fn from(t: T) -> Box<T, Global>

Converts a T into a Box<T>

The conversion allocates on the heap and moves t from the stack into it.

Examples
let x = 5;
let boxed = Box::new(5);

assert_eq!(Box::from(x), boxed);
§

impl<F> FusedFuture for Box<F, Global>where F: FusedFuture + Unpin + ?Sized,

§

fn is_terminated(&self) -> bool

Returns true if the underlying future should no longer be polled.
§

impl<S> FusedStream for Box<S, Global>where S: FusedStream + Unpin + ?Sized,

§

fn is_terminated(&self) -> bool

Returns true if the stream should no longer be polled.
1.36.0 · source§

impl<F, A> Future for Box<F, A>where F: Future + Unpin + ?Sized, A: Allocator + 'static,

§

type Output = <F as Future>::Output

The type of value produced on completion.
source§

fn poll( self: Pin<&mut Box<F, A>>, cx: &mut Context<'_> ) -> Poll<<Box<F, A> as Future>::Output>

Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
§

impl<Sp> LocalSpawn for Box<Sp, Global>where Sp: LocalSpawn + ?Sized,

§

fn spawn_local_obj( &self, future: LocalFutureObj<'static, ()> ) -> Result<(), SpawnError>

Spawns a future that will be run to completion. Read more
§

fn status_local(&self) -> Result<(), SpawnError>

Determines whether the executor is able to spawn new tasks. Read more
source§

impl<T> Log for Box<T, Global>where T: Log + ?Sized,

source§

fn enabled(&self, metadata: &Metadata<'_>) -> bool

Determines if a log message with the specified metadata would be logged. Read more
source§

fn log(&self, record: &Record<'_>)

Logs the Record. Read more
source§

fn flush(&self)

Flushes any buffered records.
1.0.0 · source§

impl<T, A> Pointer for Box<T, A>where A: Allocator, T: ?Sized,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter.
source§

impl<T> Serialize for Box<T, Global>where T: Serialize + ?Sized,

source§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T> Serialize for Box<T, Global>where T: Serialize + ?Sized,

source§

fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,

§

impl<S, Item> Sink<Item> for Box<S, Global>where S: Sink<Item> + Unpin + ?Sized,

§

type Error = <S as Sink<Item>>::Error

The type of value produced by the sink when an error occurs.
§

fn poll_ready( self: Pin<&mut Box<S, Global>>, cx: &mut Context<'_> ) -> Poll<Result<(), <Box<S, Global> as Sink<Item>>::Error>>

Attempts to prepare the Sink to receive a value. Read more
§

fn start_send( self: Pin<&mut Box<S, Global>>, item: Item ) -> Result<(), <Box<S, Global> as Sink<Item>>::Error>

Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready which returned Poll::Ready(Ok(())). Read more
§

fn poll_flush( self: Pin<&mut Box<S, Global>>, cx: &mut Context<'_> ) -> Poll<Result<(), <Box<S, Global> as Sink<Item>>::Error>>

Flush any remaining output from this sink. Read more
§

fn poll_close( self: Pin<&mut Box<S, Global>>, cx: &mut Context<'_> ) -> Poll<Result<(), <Box<S, Global> as Sink<Item>>::Error>>

Flush any remaining output and close this sink, if necessary. Read more
source§

impl<S> Source for Box<S, Global>where S: Source + ?Sized,

source§

fn visit<'kvs>(&'kvs self, visitor: &mut dyn Visitor<'kvs>) -> Result<(), Error>

Visit key-value pairs. Read more
source§

fn get<'v>(&'v self, key: Key<'_>) -> Option<Value<'v>>

Get the value for a given key. Read more
source§

fn count(&self) -> usize

Count the number of key-value pairs that can be visited. Read more
§

impl<Sp> Spawn for Box<Sp, Global>where Sp: Spawn + ?Sized,

§

fn spawn_obj(&self, future: FutureObj<'static, ()>) -> Result<(), SpawnError>

Spawns a future that will be run to completion. Read more
§

fn status(&self) -> Result<(), SpawnError>

Determines whether the executor is able to spawn new tasks. Read more
§

impl<S> Stream for Box<S, Global>where S: Stream + Unpin + ?Sized,

§

type Item = <S as Stream>::Item

Values yielded by the stream.
§

fn poll_next( self: Pin<&mut Box<S, Global>>, cx: &mut Context<'_> ) -> Poll<Option<<Box<S, Global> as Stream>::Item>>

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
§

impl<S> Subscriber for Box<S, Global>where S: Subscriber + ?Sized,

§

fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest

Registers a new callsite with this subscriber, returning whether or not the subscriber is interested in being notified about the callsite. Read more
§

fn enabled(&self, metadata: &Metadata<'_>) -> bool

Returns true if a span or event with the specified metadata would be recorded. Read more
§

fn max_level_hint(&self) -> Option<LevelFilter>

Returns the highest verbosity level that this Subscriber will enable, or None, if the subscriber does not implement level-based filtering or chooses not to implement this method. Read more
§

fn new_span(&self, span: &Attributes<'_>) -> Id

Visit the construction of a new span, returning a new span ID for the span being constructed. Read more
§

fn record(&self, span: &Id, values: &Record<'_>)

Record a set of values on a span. Read more
§

fn record_follows_from(&self, span: &Id, follows: &Id)

Adds an indication that span follows from the span with the id follows. Read more
§

fn event_enabled(&self, event: &Event<'_>) -> bool

Determine if an Event should be recorded. Read more
§

fn event(&self, event: &Event<'_>)

Records that an Event has occurred. Read more
§

fn enter(&self, span: &Id)

Records that a span has been entered. Read more
§

fn exit(&self, span: &Id)

Records that a span has been exited. Read more
§

fn clone_span(&self, id: &Id) -> Id

Notifies the subscriber that a span ID has been cloned. Read more
§

fn try_close(&self, id: Id) -> bool

Notifies the subscriber that a span ID has been dropped, and returns true if there are now 0 IDs that refer to that span. Read more
§

fn drop_span(&self, id: Id)

👎Deprecated since 0.1.2: use Subscriber::try_close instead
This method is deprecated. Read more
§

fn current_span(&self) -> Current

Returns a type representing this subscriber’s view of the current span. Read more
§

unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()>

If self is the same type as the provided TypeId, returns an untyped *const pointer to that type. Otherwise, returns None. Read more
§

fn on_register_dispatch(&self, subscriber: &Dispatch)

Invoked when this subscriber becomes a Dispatch. Read more
§

impl<'a, T, F> UnsafeFutureObj<'a, T> for Box<F, Global>where F: Future<Output = T> + 'a,

§

fn into_raw(self) -> *mut dyn Future<Output = T> + 'a

Convert an owned instance into a (conceptually owned) fat pointer. Read more
§

unsafe fn drop(ptr: *mut dyn Future<Output = T> + 'a)

Drops the future represented by the given fat pointer. Read more
§

impl<T> Value for Box<T, Global>where T: Value + ?Sized,

§

fn record(&self, key: &Field, visitor: &mut dyn Visit)

Visits this value with the given Visitor.
source§

impl<'kvs, V> Visitor<'kvs> for Box<V, Global>where V: Visitor<'kvs> + ?Sized,

source§

fn visit_pair( &mut self, key: Key<'kvs>, value: Value<'kvs> ) -> Result<(), Error>

Visit a key-value pair.