Struct serde_closure::structs::FnOnce
source · pub struct FnOnce<F> { /* private fields */ }
Expand description
A struct representing a serializable closure, created by the
FnOnce
macro. Implements traits::FnOnce
(and std::ops::FnOnce
on nightly), Debug
, Serialize
and
Deserialize
, and various convenience
traits.
See the readme for examples.
Trait Implementations
sourceimpl<'de, F> Deserialize<'de> for FnOnce<F>where
F: Deserialize<'de>,
impl<'de, F> Deserialize<'de> for FnOnce<F>where
F: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<F: Ord> Ord for FnOnce<F>
impl<F: Ord> Ord for FnOnce<F>
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<F: PartialEq> PartialEq<FnOnce<F>> for FnOnce<F>
impl<F: PartialEq> PartialEq<FnOnce<F>> for FnOnce<F>
sourceimpl<F: PartialOrd> PartialOrd<FnOnce<F>> for FnOnce<F>
impl<F: PartialOrd> PartialOrd<FnOnce<F>> for FnOnce<F>
sourcefn partial_cmp(&self, other: &FnOnce<F>) -> Option<Ordering>
fn partial_cmp(&self, other: &FnOnce<F>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<F: Copy> Copy for FnOnce<F>
impl<F: Eq> Eq for FnOnce<F>
impl<F> StructuralEq for FnOnce<F>
impl<F> StructuralPartialEq for FnOnce<F>
Auto Trait Implementations
impl<F> RefUnwindSafe for FnOnce<F>where
F: RefUnwindSafe,
impl<F> Send for FnOnce<F>where
F: Send,
impl<F> Sync for FnOnce<F>where
F: Sync,
impl<F> Unpin for FnOnce<F>where
F: Unpin,
impl<F> UnwindSafe for FnOnce<F>where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more