Trait PartialContext

Source
pub trait PartialContext<L, R>
where L: From<R>,
{ // Required methods fn has_context(&self) -> bool; fn partial(self) -> L; fn unwrap_context(self) -> R; fn context(self) -> Option<R>; // Provided method fn needs_context(&self) -> bool { ... } }

Required Methods§

Source

fn has_context(&self) -> bool

Source

fn partial(self) -> L

infallible since L is from R we can always fall back to L

Source

fn unwrap_context(self) -> R

can panic if R does not have context

Source

fn context(self) -> Option<R>

Provided Methods§

Implementors§