Skip to main content

Reply

Trait Reply 

Source
pub trait Reply {
    const TAG: TLVTag;

    // Required methods
    fn set<T>(self, value: T) -> Result<(), Error>
       where T: ToTLV;
    fn reset(&mut self);
    fn writer(&mut self) -> impl TLVWrite + Send;
    fn complete(self) -> Result<(), Error>;

    // Provided method
    fn tag(&self) -> &'static TLVTag { ... }
}

Required Associated Constants§

Source

const TAG: TLVTag

The tag to use if writing the data “manually” by using the writer method.

Required Methods§

Source

fn set<T>(self, value: T) -> Result<(), Error>
where T: ToTLV,

Set the TLV value of the reply and complete.

Source

fn reset(&mut self)

Remove everything written via the writer method since the last call to reset.

Source

fn writer(&mut self) -> impl TLVWrite + Send

Return a TLV writer to write the TLV reply data manually.

Source

fn complete(self) -> Result<(), Error>

Complete the manual TLV write of the reply.

Provided Methods§

Source

fn tag(&self) -> &'static TLVTag

Return the tag to use if writing the TLV reply data in smaller chunks by using the writer method (as opposed to just calling set). A convenience method to avoid using the Self::TAG directly.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§