[][src]Trait snec::Receiver

pub trait Receiver<E: Entry> {
    fn receive(&mut self, new_value: &E::Data);
}

Trait for types which wish to be notified when the specified configuration table entry changes.

Several reference types and standard library types implement Receiver:

  • A mutable borrow of any type can be used as a receiver

Required methods

fn receive(&mut self, new_value: &E::Data)

Receive a notification about the value of the entry changing to the specified new value.

This method shouldn't be called manually — please use EntryStorage instead, which will automatically call this method. It's a logic error to invoke this without actually setting the value to something new in the storage.

Loading content...

Implementations on Foreign Types

impl<E, R: ?Sized, '_> Receiver<E> for &'_ mut R where
    E: Entry,
    R: Receiver<E>, 
[src]

impl<E, R> Receiver<E> for Option<R> where
    E: Entry,
    R: Receiver<E>, 
[src]

impl<E, R, '_> Receiver<E> for &'_ Option<R> where
    E: Entry,
    &'a R: Receiver<E>, 
[src]

impl<E, R: ?Sized> Receiver<E> for Box<R> where
    E: Entry,
    R: Receiver<E>, 
[src]

impl<E, R, '_> Receiver<E> for &'_ Box<R> where
    E: Entry,
    R: ?Sized,
    &'a R: Receiver<E>, 
[src]

impl<E, R> Receiver<E> for Rc<R> where
    E: Entry,
    R: ?Sized,
    &'a R: Receiver<E>, 
[src]

impl<E, R> Receiver<E> for Arc<R> where
    E: Entry,
    R: ?Sized,
    &'a R: Receiver<E>, 
[src]

impl<E, R: ?Sized> Receiver<E> for RefCell<R> where
    E: Entry,
    R: Receiver<E>, 
[src]

impl<E, R: ?Sized, '_> Receiver<E> for &'_ RefCell<R> where
    E: Entry,
    R: Receiver<E>, 
[src]

impl<E, R: ?Sized> Receiver<E> for Mutex<R> where
    E: Entry,
    R: Receiver<E>, 
[src]

impl<E, R: ?Sized, '_> Receiver<E> for &'_ Mutex<R> where
    E: Entry,
    R: Receiver<E>, 
[src]

impl<E, R: ?Sized> Receiver<E> for RwLock<R> where
    E: Entry,
    R: Receiver<E>, 
[src]

impl<E, R: ?Sized, '_> Receiver<E> for &'_ RwLock<R> where
    E: Entry,
    R: Receiver<E>, 
[src]

Loading content...

Implementors

impl<E: Entry> Receiver<E> for EmptyReceiver[src]

impl<E: Entry, '_> Receiver<E> for &'_ EmptyReceiver[src]

impl<E: Entry, F: Fn(&E::Data), '_> Receiver<E> for &'_ FnReceiver<E, F>[src]

impl<E: Entry, F: FnMut(&E::Data)> Receiver<E> for FnReceiver<E, F>[src]

impl<E: Entry, I> Receiver<E> for IterReceiver<E, I> where
    &'a mut I: IntoIterator,
    <&'a mut I as IntoIterator>::Item: Receiver<E>, 
[src]

impl<E: Entry, I, '_> Receiver<E> for &'_ IterReceiver<E, I> where
    &'a mut I: IntoIterator,
    &'a I: IntoIterator,
    <&'a mut I as IntoIterator>::Item: Receiver<E>,
    <&'a I as IntoIterator>::Item: Receiver<E>, 
[src]

Loading content...