Trait Context

Source
pub trait Context:
    Sync
    + Send
    + AnySync {
    // Required method
    fn term(&self) -> Arc<Terminal>;
}

Required Methods§

Source

fn term(&self) -> Arc<Terminal>

Implementations§

Source§

impl dyn Context

Source

pub fn is<_T>(&self) -> bool
where _T: Any, Self: Downcast<_T>,

Source

pub fn downcast_ref<_T>(&self) -> Result<&_T, TypeMismatch>
where _T: Any, Self: Downcast<_T>,

Source

pub fn downcast_mut<_T>(&mut self) -> Result<&mut _T, TypeMismatch>
where _T: Any, Self: Downcast<_T>,

Source

pub fn downcast<_T>( self: Box<Self>, ) -> Result<Box<_T>, DowncastError<Box<Self>>>
where _T: Any, Self: Downcast<_T>,

Source

pub fn downcast_rc<_T>( self: Rc<Self>, ) -> Result<Rc<_T>, DowncastError<Rc<Self>>>
where _T: Any, Self: Downcast<_T>,

Source

pub fn downcast_arc<_T>( self: Arc<Self>, ) -> Result<Arc<_T>, DowncastError<Arc<Self>>>
where _T: AnySync, Self: DowncastSync<_T>,

Source§

impl dyn Context + Sync + Send

Source

pub fn is<_T>(&self) -> bool
where _T: Any, Self: Downcast<_T>,

Source

pub fn downcast_ref<_T>(&self) -> Result<&_T, TypeMismatch>
where _T: Any, Self: Downcast<_T>,

Source

pub fn downcast_mut<_T>(&mut self) -> Result<&mut _T, TypeMismatch>
where _T: Any, Self: Downcast<_T>,

Source

pub fn downcast<_T>( self: Box<Self>, ) -> Result<Box<_T>, DowncastError<Box<Self>>>
where _T: Any, Self: Downcast<_T>,

Source

pub fn downcast_rc<_T>( self: Rc<Self>, ) -> Result<Rc<_T>, DowncastError<Rc<Self>>>
where _T: Any, Self: Downcast<_T>,

Source

pub fn downcast_arc<_T>( self: Arc<Self>, ) -> Result<Arc<_T>, DowncastError<Arc<Self>>>
where _T: AnySync, Self: DowncastSync<_T>,

Trait Implementations§

Source§

impl<_T> Downcast<_T> for dyn Context
where _T: Any,

Source§

impl<_T> Downcast<_T> for dyn Context + Sync + Send
where _T: Any,

Source§

impl<_T> DowncastSync<_T> for dyn Context
where _T: AnySync,

Source§

fn downcast_arc(self: Arc<Self>) -> Result<Arc<T>, DowncastError<Arc<Self>>>

Source§

impl<_T> DowncastSync<_T> for dyn Context + Sync + Send
where _T: AnySync,

Source§

fn downcast_arc(self: Arc<Self>) -> Result<Arc<T>, DowncastError<Arc<Self>>>

Source§

impl From<&(dyn Context + 'static)> for Arc<Terminal>

Source§

fn from(ctx: &dyn Context) -> Arc<Terminal>

Converts to this type from the input type.

Implementors§