pub enum NullabilityHandling {
Mirror,
DeclaredOutput,
Discrete,
}Expand description
The specified nullability behavior of a function.
Variants§
Mirror
Specifies that a function can capture any combination of nullability for its arguments. If and only if none of the arguments are nullable, will output types be non-nullable. This is captured in the patterns by replacing all top-level nullability specifiers with an inconsistent binding named with something not yet used for anything else. Toplevel bindings that were not yet overriding nullability are furthermore promoted to bindings that do override nullability, using the same inconsistent binding for the nullability specifier.
DeclaredOutput
Specifies that a function can capture any combination of nullability for its arguments. Nullability of the output types is not modified. This is captured in the patterns by replacing all top-level nullability specifiers in the argument patterns with Any patterns.
Discrete
Specifies that the nullability of the arguments and output types are exactly as specified; no changes are needed for the patterns.
Trait Implementations§
Source§impl Clone for NullabilityHandling
impl Clone for NullabilityHandling
Source§fn clone(&self) -> NullabilityHandling
fn clone(&self) -> NullabilityHandling
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NullabilityHandling
impl Debug for NullabilityHandling
Source§impl PartialEq for NullabilityHandling
impl PartialEq for NullabilityHandling
impl Eq for NullabilityHandling
impl StructuralPartialEq for NullabilityHandling
Auto Trait Implementations§
impl Freeze for NullabilityHandling
impl RefUnwindSafe for NullabilityHandling
impl Send for NullabilityHandling
impl Sync for NullabilityHandling
impl Unpin for NullabilityHandling
impl UnwindSafe for NullabilityHandling
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointerSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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