pub struct OptionDesc {
pub inner: &'static ModelTable,
pub get: for<'a> fn(&'a dyn Any) -> Option<&'a dyn Any>,
pub get_mut: for<'a> fn(&'a mut dyn Any) -> Option<&'a mut dyn Any>,
pub slot: for<'a> fn(&'a mut dyn Any) -> Option<&'a mut dyn Any>,
pub clear: fn(&mut dyn Any),
pub staged: (fn() -> Box<dyn Any>, for<'a> fn(&'a dyn Any) -> Option<&'a dyn Any>),
}Expand description
What Option<T>’s table reaches into one with.
Fields§
§inner: &'static ModelTableT’s table.
get: for<'a> fn(&'a dyn Any) -> Option<&'a dyn Any>The present value of an option.
get_mut: for<'a> fn(&'a mut dyn Any) -> Option<&'a mut dyn Any>The same, mutably.
slot: for<'a> fn(&'a mut dyn Any) -> Option<&'a mut dyn Any>Put an absent option into out (an Option of the option) and hand
back that option, for T’s table to put a value into.
clear: fn(&mut dyn Any)Make an option absent.
staged: (fn() -> Box<dyn Any>, for<'a> fn(&'a dyn Any) -> Option<&'a dyn Any>)An empty Option of the option, and the option in a filled one.
Auto Trait Implementations§
impl Forget for OptionDesc
impl Freeze for OptionDescwhere
&'static ModelTable: Freeze,
impl Move for OptionDesc
impl RefUnwindSafe for OptionDesc
impl Send for OptionDescwhere
&'static ModelTable: Send,
impl Sync for OptionDesc
impl Unpin for OptionDescwhere
&'static ModelTable: Unpin,
impl UnsafeUnpin for OptionDescwhere
&'static ModelTable: UnsafeUnpin,
impl UnwindSafe for OptionDescwhere
&'static ModelTable: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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