Trait ValT

Source
pub trait ValT:
    ValT
    + Ord
    + From<f64> {
    // Required methods
    fn into_seq<S: FromIterator<Self>>(self) -> Result<S, Self>;
    fn as_isize(&self) -> Option<isize>;
    fn as_f64(&self) -> Result<f64, Error<Self>>;
}
Expand description

Values that the core library can operate on.

Required Methods§

Source

fn into_seq<S: FromIterator<Self>>(self) -> Result<S, Self>

Convert an array into a sequence.

This returns the original value as Err if it is not an array.

Source

fn as_isize(&self) -> Option<isize>

Use the value as integer.

Source

fn as_f64(&self) -> Result<f64, Error<Self>>

Use the value as floating-point number.

This may fail in more complex ways than Self::as_isize, because the value may either be not a number or a number that does not fit into f64.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§