[−][src]Enum arnalisa::Item
An item which gets passed on between bins through pipes.
Variants
No value (akin to Null
or None
in programming languages).
B(bool)
A boolean value.
I8(i8)
A signed 8-bit integer value.
I16(i16)
A signed 16-bit integer value.
I32(i32)
A signed 32-bit integer value.
I64(i64)
A signed 64-bit integer value.
U8(u8)
An unsigned 8-bit integer value.
U16(u16)
An unsigned 16-bit integer value.
U32(u32)
An unsigned 32-bit integer value.
U64(u64)
An unsigned 64-bit integer value.
F32(R32)
A 32-bit floating point value.
F64(R64)
A 64-bit floating point value.
Methods
impl Item
[src]
pub fn is_bool(&self) -> bool
[src]
Check whether the item is a Item::B(_)
.
pub fn is_numeric(&self) -> bool
[src]
Check whether the item is one of the integer or float variants.
pub fn is_float(&self) -> bool
[src]
Check whether the item is a Item::F32(_)
or a Item::F64(_)
.
pub fn can_convert_to_f64(&self) -> bool
[src]
Check whether the item can be converted to f64
.
pub fn to_u64(&self) -> Result<u64>
[src]
Convert the item to a u64
.
- A
Item::B(_)
becomes0u64
iffalse
,1u64
iftrue
. - Any numeric item gets casted to a
u64
. Item::Nothing
returns an error.
pub fn to_usize(&self) -> Result<usize>
[src]
Convert the item to a usize
.
- A
Item::B(_)
becomes0usize
iffalse
,1usize
iftrue
. - Any numeric item gets casted to a
usize
. Item::Nothing
returns an error.
pub fn to_bool(&self) -> Result<bool>
[src]
Convert the item to a bool
.
- A
Item::B(_)
gets converted directly. - Any numeric item becomes
false
if zero, otherwisetrue
. Item::Nothing
becomesfalse
.
pub fn to_float(&self) -> Result<R64>
[src]
Convert the item to a float value.
- A
Item::B(_)
becomes0f64
iffalse
,1f64
iftrue
. - Any numeric item gets casted to a
f64
. Item::Nothing
returns an error.
pub fn is_unsigned(&self) -> bool
[src]
Check whether the item is an unsigned type.
Item::B(_)
counts as unsigned.
pub fn to_unsigned(&self) -> Result<u64>
[src]
Convert the item to a u64
.
- A
Item::B(_)
becomes0u64
iffalse
,1u64
iftrue
. - Any numeric item gets casted to a
u64
. Item::Nothing
returns an error.
pub fn is_signed(&self) -> bool
[src]
Check whether the item is an unsigned type.
Item::B(_)
counts as unsigned.
pub fn to_signed(&self) -> Result<i64>
[src]
Convert the item to a i64
.
- A
Item::B(_)
becomes0i64
iffalse
,1i64
iftrue
. - Any numeric item gets casted to a
i64
. Item::Nothing
returns an error.
pub fn counts_as_true(&self) -> bool
[src]
Check whether the value counts as true.
Item::B(_)
counts as it's enclosed value.- All numeric values count as
true
if not zero. Item::Nothing
counts asfalse
.
Trait Implementations
impl From<bool> for Item
[src]
impl From<i8> for Item
[src]
impl From<i16> for Item
[src]
impl From<i32> for Item
[src]
impl From<i64> for Item
[src]
impl From<u8> for Item
[src]
impl From<u16> for Item
[src]
impl From<u32> for Item
[src]
impl From<u64> for Item
[src]
impl From<f64> for Item
[src]
impl From<ConstrainedFloat<f64, FiniteConstraint<f64>>> for Item
[src]
impl From<f32> for Item
[src]
impl From<ConstrainedFloat<f32, FiniteConstraint<f32>>> for Item
[src]
impl<T> From<Option<T>> for Item where
Item: From<T>,
[src]
Item: From<T>,
impl Clone for Item
[src]
impl Default for Item
[src]
impl Eq for Item
[src]
impl Ord for Item
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Item> for Item
[src]
impl PartialOrd<Item> for Item
[src]
fn partial_cmp(&self, other: &Item) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Debug for Item
[src]
impl Serialize for Item
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Item
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
impl RefUnwindSafe for Item
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<T> PathLoad for T where
T: DeserializeOwned,
T: DeserializeOwned,
fn load_from_path<P>(path: P) -> Result<T, Error> where
P: AsRef<Path> + Debug,
P: AsRef<Path> + Debug,