Trait uiua::ArrayValue

source ·
pub trait ArrayValue: Clone + Debug + Display + GridFmt + ArrayCmp + Send + Sync + 'static {
    const NAME: &'static str;

    // Required methods
    fn get_fill(env: &Uiua) -> Option<Self>;
    fn array_hash<H: Hasher>(&self, hasher: &mut H);

    // Provided methods
    fn format_delims() -> (&'static str, &'static str) { ... }
    fn format_sep() -> &'static str { ... }
}
Expand description

A trait for types that can be used as array elements

Required Associated Constants§

source

const NAME: &'static str

The type name

Required Methods§

source

fn get_fill(env: &Uiua) -> Option<Self>

Get the fill value from the environment

source

fn array_hash<H: Hasher>(&self, hasher: &mut H)

Hash the value

Provided Methods§

source

fn format_delims() -> (&'static str, &'static str)

Delimiters for formatting

source

fn format_sep() -> &'static str

Separator for formatting

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ArrayValue for char

source§

const NAME: &'static str = "character"

source§

fn get_fill(env: &Uiua) -> Option<Self>

source§

fn format_delims() -> (&'static str, &'static str)

source§

fn format_sep() -> &'static str

source§

fn array_hash<H: Hasher>(&self, hasher: &mut H)

source§

impl ArrayValue for f64

source§

const NAME: &'static str = "number"

source§

fn get_fill(env: &Uiua) -> Option<Self>

source§

fn array_hash<H: Hasher>(&self, hasher: &mut H)

source§

impl ArrayValue for u8

source§

const NAME: &'static str = "number"

source§

fn get_fill(env: &Uiua) -> Option<Self>

source§

fn array_hash<H: Hasher>(&self, hasher: &mut H)

Implementors§

source§

impl ArrayValue for Boxed

source§

const NAME: &'static str = "box"

source§

impl ArrayValue for Complex

source§

const NAME: &'static str = "complex"