[−][src]Struct clint::handler::Handler
Methods
impl<'a> Handler<'a>
[src]
pub const fn new() -> Self
[src]
Returns a new Handler that initially does nothing when
called. Override its behavior by using replace
.
pub unsafe fn replace(&mut self, f: &(dyn FnMut() + Send + 'a))
[src]
Replace the behavior of this handler with f
.
Safety
There is no exclusion on replacing the handler's behavior
while it is being executed. It is your responsibility to make
sure that it's not being executed when you call replace
.
pub unsafe fn call(&self)
[src]
Execute this handler.
Safety
This function assumes that a replace is not occurring when the
closure is being looked up. You need to ensure that replace
and call
can not occur at the same time.
pub fn default_handler()
[src]
Do nothing handler. Needed by call
until replace
is used
to set specific behavior. Can also be used to replace a
closure that is about to go out of scope.
Trait Implementations
impl<'a> Debug for Handler<'a>
[src]
impl<'a> Copy for Handler<'a>
[src]
impl<'a> Clone for Handler<'a>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,