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§
Sourcefn unwrap_std(self) -> Self::StdImpl
fn unwrap_std(self) -> Self::StdImpl
Unwraps the std underlying implementation of the MaybeFut type.
Sourcefn unwrap_tokio(self) -> Self::TokioImpl
fn unwrap_tokio(self) -> Self::TokioImpl
Unwraps the tokio underlying implementation of the MaybeFut type.
Sourcefn unwrap_std_ref(&self) -> &Self::StdImpl
fn unwrap_std_ref(&self) -> &Self::StdImpl
Unwraps the std underlying implementation of the MaybeFut type as a reference.
Sourcefn unwrap_tokio_ref(&self) -> &Self::TokioImpl
fn unwrap_tokio_ref(&self) -> &Self::TokioImpl
Unwraps the tokio underlying implementation of the MaybeFut type as a reference.
Sourcefn unwrap_std_mut(&mut self) -> &mut Self::StdImpl
fn unwrap_std_mut(&mut self) -> &mut Self::StdImpl
Unwraps the std underlying implementation of the MaybeFut type as a mutable reference.
Sourcefn unwrap_tokio_mut(&mut self) -> &mut Self::TokioImpl
fn unwrap_tokio_mut(&mut self) -> &mut Self::TokioImpl
Unwraps the tokio underlying implementation of the MaybeFut type as a mutable reference.
Sourcefn get_std(self) -> Option<Self::StdImpl>
fn get_std(self) -> Option<Self::StdImpl>
Safely unwraps the std underlying implementation of the MaybeFut type.
Sourcefn get_tokio(self) -> Option<Self::TokioImpl>
fn get_tokio(self) -> Option<Self::TokioImpl>
Safely unwraps the tokio underlying implementation of the MaybeFut type.
Sourcefn get_std_ref(&self) -> Option<&Self::StdImpl>
fn get_std_ref(&self) -> Option<&Self::StdImpl>
Safely unwraps the std underlying implementation of the MaybeFut type as a reference.
Sourcefn get_tokio_ref(&self) -> Option<&Self::TokioImpl>
fn get_tokio_ref(&self) -> Option<&Self::TokioImpl>
Safely unwraps the tokio underlying implementation of the MaybeFut type as a reference.
Sourcefn get_std_mut(&mut self) -> Option<&mut Self::StdImpl>
fn get_std_mut(&mut self) -> Option<&mut Self::StdImpl>
Safely unwraps the std underlying implementation of the MaybeFut type as a mutable reference.
Sourcefn get_tokio_mut(&mut self) -> Option<&mut Self::TokioImpl>
fn get_tokio_mut(&mut self) -> Option<&mut Self::TokioImpl>
Safely unwraps the tokio underlying implementation of the MaybeFut type as a mutable reference.