Enum tc_value::ComplexType
source · [−]pub enum ComplexType {
C32,
C64,
Complex,
}
Expand description
The type of a Complex
number.
Variants
C32
C64
Complex
Trait Implementations
sourceimpl Clone for ComplexType
impl Clone for ComplexType
sourcefn clone(&self) -> ComplexType
fn clone(&self) -> ComplexType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ComplexType
impl Debug for ComplexType
sourceimpl Default for ComplexType
impl Default for ComplexType
sourcefn default() -> ComplexType
fn default() -> ComplexType
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ComplexType
impl<'de> Deserialize<'de> for ComplexType
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<ComplexType, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ComplexType, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for ComplexType
impl Display for ComplexType
sourceimpl From<ComplexType> for NumberType
impl From<ComplexType> for NumberType
sourcefn from(ct: ComplexType) -> NumberType
fn from(ct: ComplexType) -> NumberType
Converts to this type from the input type.
sourceimpl Hash for ComplexType
impl Hash for ComplexType
sourceimpl NumberClass for ComplexType
impl NumberClass for ComplexType
type Instance = Complex
sourcefn is_complex(&self) -> bool
fn is_complex(&self) -> bool
Return true
if this is a complex type.
sourceimpl Ord for ComplexType
impl Ord for ComplexType
sourceimpl PartialEq<ComplexType> for ComplexType
impl PartialEq<ComplexType> for ComplexType
sourceimpl PartialOrd<ComplexType> for ComplexType
impl PartialOrd<ComplexType> for ComplexType
sourcefn partial_cmp(&self, other: &ComplexType) -> Option<Ordering>
fn partial_cmp(&self, other: &ComplexType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
sourceimpl Serialize for ComplexType
impl Serialize for ComplexType
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for ComplexType
impl Eq for ComplexType
impl StructuralEq for ComplexType
impl StructuralPartialEq for ComplexType
Auto Trait Implementations
impl RefUnwindSafe for ComplexType
impl Send for ComplexType
impl Sync for ComplexType
impl Unpin for ComplexType
impl UnwindSafe for ComplexType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<F> Match for F
impl<F> Match for F
sourcefn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
Returns true
if self
can be cast into the target type T
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
sourcefn can_cast_from(&F) -> bool
fn can_cast_from(&F) -> bool
Test if value
can be cast into Self
.
sourcefn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
sourcefn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if self
can be cast into T
.
sourcefn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns Some(T)
if self
can be cast into T
, otherwise None
.
sourcefn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.