Skip to main content

Question

Trait Question 

Source
pub trait Question:
    Copy
    + Eq
    + Debug
    + 'static {
    type Answer: Answer<Question = Self>;

    const ALL: &'static [Self];

    // Required method
    fn name(self) -> &'static str;

    // Provided method
    fn slot(self) -> u16 { ... }
}
Expand description

One question a kind owes an answer to, beyond the questions every kind owes.

Required Associated Constants§

Source

const ALL: &'static [Self]

The complete roster, in the order the kind states it.

Required Associated Types§

Source

type Answer: Answer<Question = Self>

The typed answer to a question of this roster.

Required Methods§

Source

fn name(self) -> &'static str

This question’s declared name.

Provided Methods§

Source

fn slot(self) -> u16

This question’s position in the roster, which an explanation’s preimage carries.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§