Struct NoArgCallback
pub struct NoArgCallback<R>(/* private fields */);Implementations§
§impl<R> NoArgCallback<R>
impl<R> NoArgCallback<R>
pub fn new(callback: impl FnMut() -> R + 'static) -> NoArgCallback<R>
pub fn call(&self) -> R
Trait Implementations§
§impl<R> Clone for NoArgCallback<R>
impl<R> Clone for NoArgCallback<R>
§fn clone(&self) -> NoArgCallback<R>
fn clone(&self) -> NoArgCallback<R>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl<R, H> From<H> for NoArgCallback<R>where
H: FnMut() -> R + 'static,
impl<R, H> From<H> for NoArgCallback<R>where
H: FnMut() -> R + 'static,
§fn from(value: H) -> NoArgCallback<R>
fn from(value: H) -> NoArgCallback<R>
Converts to this type from the input type.
§impl<R> PartialEq for NoArgCallback<R>
impl<R> PartialEq for NoArgCallback<R>
Auto Trait Implementations§
impl<R> Freeze for NoArgCallback<R>
impl<R> !RefUnwindSafe for NoArgCallback<R>
impl<R> !Send for NoArgCallback<R>
impl<R> !Sync for NoArgCallback<R>
impl<R> Unpin for NoArgCallback<R>
impl<R> !UnwindSafe for NoArgCallback<R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> ComponentProps for T
impl<T> ComponentProps for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more