Skip to main content

Answer

Trait Answer 

Source
pub trait Answer:
    Clone
    + Eq
    + Debug {
    type Question: Question;

    // Required methods
    fn question(&self) -> Self::Question;
    fn encode_into(&self, into: &mut Vec<u8>);
    fn human(&self) -> String;
}
Expand description

One typed answer, and the question it answers.

Required Associated Types§

Source

type Question: Question

The roster this answer belongs to.

Required Methods§

Source

fn question(&self) -> Self::Question

The question this answer answers.

Source

fn encode_into(&self, into: &mut Vec<u8>)

Append this answer’s canonical bytes.

Source

fn human(&self) -> String

This answer rendered for a person.

A projection: no identity, decision, or refusal reads one back.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§