Unwrap

Trait Unwrap 

Source
pub trait Unwrap {
    type StdImpl;
    type TokioImpl;

    // Required methods
    fn unwrap_std(self) -> Self::StdImpl;
    fn unwrap_tokio(self) -> Self::TokioImpl;
    fn unwrap_std_ref(&self) -> &Self::StdImpl;
    fn unwrap_tokio_ref(&self) -> &Self::TokioImpl;
    fn unwrap_std_mut(&mut self) -> &mut Self::StdImpl;
    fn unwrap_tokio_mut(&mut self) -> &mut Self::TokioImpl;
    fn get_std(self) -> Option<Self::StdImpl>;
    fn get_tokio(self) -> Option<Self::TokioImpl>;
    fn get_std_ref(&self) -> Option<&Self::StdImpl>;
    fn get_tokio_ref(&self) -> Option<&Self::TokioImpl>;
    fn get_std_mut(&mut self) -> Option<&mut Self::StdImpl>;
    fn get_tokio_mut(&mut self) -> Option<&mut Self::TokioImpl>;
}
Expand description

Unwrap trait for MaybeFut types.

This trait provides methods to get the underlying implementations for the MaybeFut wrappers.

Every type implemented by the maybe_fut library has a corresponding Unwrap implementation.

Required Associated Types§

Required Methods§

Source

fn unwrap_std(self) -> Self::StdImpl

Unwraps the std underlying implementation of the MaybeFut type.

Source

fn unwrap_tokio(self) -> Self::TokioImpl

Unwraps the tokio underlying implementation of the MaybeFut type.

Source

fn unwrap_std_ref(&self) -> &Self::StdImpl

Unwraps the std underlying implementation of the MaybeFut type as a reference.

Source

fn unwrap_tokio_ref(&self) -> &Self::TokioImpl

Unwraps the tokio underlying implementation of the MaybeFut type as a reference.

Source

fn unwrap_std_mut(&mut self) -> &mut Self::StdImpl

Unwraps the std underlying implementation of the MaybeFut type as a mutable reference.

Source

fn unwrap_tokio_mut(&mut self) -> &mut Self::TokioImpl

Unwraps the tokio underlying implementation of the MaybeFut type as a mutable reference.

Source

fn get_std(self) -> Option<Self::StdImpl>

Safely unwraps the std underlying implementation of the MaybeFut type.

Source

fn get_tokio(self) -> Option<Self::TokioImpl>

Safely unwraps the tokio underlying implementation of the MaybeFut type.

Source

fn get_std_ref(&self) -> Option<&Self::StdImpl>

Safely unwraps the std underlying implementation of the MaybeFut type as a reference.

Source

fn get_tokio_ref(&self) -> Option<&Self::TokioImpl>

Safely unwraps the tokio underlying implementation of the MaybeFut type as a reference.

Source

fn get_std_mut(&mut self) -> Option<&mut Self::StdImpl>

Safely unwraps the std underlying implementation of the MaybeFut type as a mutable reference.

Source

fn get_tokio_mut(&mut self) -> Option<&mut Self::TokioImpl>

Safely unwraps the tokio underlying implementation of the MaybeFut type as a mutable reference.

Implementors§