Enum tvix_eval::CoercionKind
source · pub enum CoercionKind {
Weak,
Strong,
}
Expand description
Describes what input types are allowed when coercing a Value
to a string
Variants§
Weak
Only coerce already “stringly” types like strings and paths, but also
coerce sets that have a __toString
attribute. Equivalent to
!coerceMore
in C++ Nix.
Strong
Coerce all value types included by Weak
, but also coerce null
,
booleans, integers, floats and lists of coercible types. Equivalent to
coerceMore
in C++ Nix.
Trait Implementations§
source§impl Clone for CoercionKind
impl Clone for CoercionKind
source§fn clone(&self) -> CoercionKind
fn clone(&self) -> CoercionKind
Returns a copy 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 moresource§impl Debug for CoercionKind
impl Debug for CoercionKind
source§impl PartialEq<CoercionKind> for CoercionKind
impl PartialEq<CoercionKind> for CoercionKind
source§fn eq(&self, other: &CoercionKind) -> bool
fn eq(&self, other: &CoercionKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for CoercionKind
impl StructuralPartialEq for CoercionKind
Auto Trait Implementations§
impl RefUnwindSafe for CoercionKind
impl Send for CoercionKind
impl Sync for CoercionKind
impl Unpin for CoercionKind
impl UnwindSafe for CoercionKind
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