TryExtractor

Trait TryExtractor 

Source
pub trait TryExtractor: Extractor<Output = Result<Self::Ok, Self::Error>> {
    type Ok;
    type Error;

    // Required method
    fn try_get(self) -> Result<Self::Ok, Self::Error>;
}
Expand description

Represents an Extractor whose output is a Result Useful for deriving traits that should be aware of Result Ok and Error values.

Required Associated Types§

Source

type Ok

The Result::Ok value of an Extractor

Source

type Error

The Result::Err value of an Extractor

Required Methods§

Source

fn try_get(self) -> Result<Self::Ok, Self::Error>

Try to get the extraction result

Implementors§

Source§

impl<T, O, Err> TryExtractor for T
where T: Extractor<Output = Result<O, Err>>,

Source§

type Ok = O

Source§

type Error = Err