pub trait NumExt {
type PwrType;
// Required methods
fn len(&self) -> usize;
fn head(&self, n: Self::PwrType) -> Self;
fn mid(&self, start: Self::PwrType, len: Self::PwrType) -> Self;
fn pop(&self, n: Self::PwrType) -> Self;
fn tovec(&self, by: Self::PwrType) -> Vec<Self>
where Self: Sized;
fn format(&self, sep: &str) -> String;
}Required Associated Types§
Required Methods§
fn len(&self) -> usize
fn head(&self, n: Self::PwrType) -> Self
fn mid(&self, start: Self::PwrType, len: Self::PwrType) -> Self
fn pop(&self, n: Self::PwrType) -> Self
fn tovec(&self, by: Self::PwrType) -> Vec<Self>where
Self: Sized,
fn format(&self, sep: &str) -> String
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.
Implementations on Foreign Types§
Source§impl NumExt for f32
impl NumExt for f32
Source§fn mid(&self, start: Self::PwrType, len: Self::PwrType) -> Self
fn mid(&self, start: Self::PwrType, len: Self::PwrType) -> Self
§panic
panic if (self.len - start) < len
type PwrType = f32
fn len(&self) -> usize
fn head(&self, n: Self::PwrType) -> Self
fn pop(&self, n: Self::PwrType) -> Self
fn tovec(&self, by: Self::PwrType) -> Vec<Self>where
Self: Sized,
fn format(&self, sep: &str) -> String
Source§impl NumExt for f64
impl NumExt for f64
Source§fn mid(&self, start: Self::PwrType, len: Self::PwrType) -> Self
fn mid(&self, start: Self::PwrType, len: Self::PwrType) -> Self
§panic
panic if (self.len - start) < len