Skip to main content

SharedDestination

Trait SharedDestination 

Source
pub trait SharedDestination<Destination>
where Destination: 'static + Subscriber + Send + Sync + ?Sized,
{ // Required methods fn access<F>(&mut self, accessor: F) where F: Fn(&Destination); fn access_mut<F>(&mut self, accessor: F) where F: FnMut(&mut Destination); }

Required Methods§

Source

fn access<F>(&mut self, accessor: F)
where F: Fn(&Destination),

Source

fn access_mut<F>(&mut self, accessor: F)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<Destination> SharedDestination<Destination> for Arc<Mutex<Destination>>
where Destination: 'static + Subscriber + Send + Sync + ?Sized,

Source§

fn access<F>(&mut self, accessor: F)
where F: Fn(&Destination),

Source§

fn access_mut<F>(&mut self, accessor: F)

Source§

impl<Destination> SharedDestination<Destination> for Arc<RwLock<Destination>>
where Destination: 'static + Subscriber + Send + Sync + ?Sized,

Source§

fn access<F>(&mut self, accessor: F)
where F: Fn(&Destination),

Source§

fn access_mut<F>(&mut self, accessor: F)

Source§

impl<Destination> SharedDestination<Destination> for Weak<Mutex<Destination>>
where Destination: 'static + Subscriber + Send + Sync + ?Sized,

Source§

fn access<F>(&mut self, accessor: F)
where F: Fn(&Destination),

Source§

fn access_mut<F>(&mut self, accessor: F)

Implementors§

Source§

impl<Destination> SharedDestination<Destination> for SharedSubscriber<Destination>
where Destination: 'static + Subscriber + Send + Sync,