pub trait HostOutgoingValue {
    // Required methods
    fn new_outgoing_value<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Resource<OutgoingValue>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn outgoing_value_write_body<'life0, 'async_trait>(
        &'life0 mut self,
        self_: Resource<OutgoingValue>,
    ) -> Pin<Box<dyn Future<Output = Result<Result<Resource<OutputStream>, ()>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn finish<'life0, 'async_trait>(
        &'life0 mut self,
        this: Resource<OutgoingValue>,
    ) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn drop<'life0, 'async_trait>(
        &'life0 mut self,
        rep: Resource<OutgoingValue>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn new_outgoing_value<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Resource<OutgoingValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn outgoing_value_write_body<'life0, 'async_trait>( &'life0 mut self, self_: Resource<OutgoingValue>, ) -> Pin<Box<dyn Future<Output = Result<Result<Resource<OutputStream>, ()>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a stream for writing the value contents.

The returned output-stream is a child resource: it must be dropped before the parent outgoing-value resource is dropped (or finished), otherwise the outgoing-value drop or finish will trap.

Returns success on the first call: the output-stream resource for this outgoing-value may be retrieved at most once. Subsequent calls will return error.

source

fn finish<'life0, 'async_trait>( &'life0 mut self, this: Resource<OutgoingValue>, ) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Finalize an outgoing value. This must be called to signal that the outgoing value is complete. If the outgoing-value is dropped without calling outgoing-value.finalize, the implementation should treat the value as corrupted.

source

fn drop<'life0, 'async_trait>( &'life0 mut self, rep: Resource<OutgoingValue>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

source§

impl<_T: HostOutgoingValue + ?Sized + Send> HostOutgoingValue for &mut _T

source§

fn outgoing_value_write_body<'life0, 'async_trait>( &'life0 mut self, self_: Resource<OutgoingValue>, ) -> Pin<Box<dyn Future<Output = Result<Result<Resource<OutputStream>, ()>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a stream for writing the value contents.

The returned output-stream is a child resource: it must be dropped before the parent outgoing-value resource is dropped (or finished), otherwise the outgoing-value drop or finish will trap.

Returns success on the first call: the output-stream resource for this outgoing-value may be retrieved at most once. Subsequent calls will return error.

source§

fn finish<'life0, 'async_trait>( &'life0 mut self, this: Resource<OutgoingValue>, ) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Finalize an outgoing value. This must be called to signal that the outgoing value is complete. If the outgoing-value is dropped without calling outgoing-value.finalize, the implementation should treat the value as corrupted.

source§

fn new_outgoing_value<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Resource<OutgoingValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn drop<'life0, 'async_trait>( &'life0 mut self, rep: Resource<OutgoingValue>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§