Skip to main content

AnswerType

Trait AnswerType 

Source
pub trait AnswerType:
    Clone
    + Send
    + Sync
    + 'static {
    // Required method
    fn from_answer_value(value: &AnswerValue) -> Result<Self, Error>;
}
Expand description

Conversion supported by a typed answer.

Required Methods§

Source

fn from_answer_value(value: &AnswerValue) -> Result<Self, Error>

Check and copy a heterogeneous value.

§Errors

Returns an error when the dynamic value cannot be represented by this output type. Built-in conversions report InvalidResponse for a variant mismatch.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl AnswerType for String

Source§

impl AnswerType for bool

Source§

impl AnswerType for f64

Implementors§