pub trait ArrayValue:
Default
+ Clone
+ Debug
+ Display
+ GridFmt
+ ArrayCmp
+ Send
+ Sync
+ 'static {
const NAME: &'static str;
const SYMBOL: char;
const TYPE_ID: u8;
// Required methods
fn get_scalar_fill(fill: &Fill<'_>) -> Result<FillValue<Self>, &'static str>;
fn get_array_fill(
fill: &Fill<'_>,
) -> Result<FillValue<Array<Self>>, &'static str>;
fn array_hash<H: Hasher>(&self, hasher: &mut H);
fn proxy() -> Self;
// Provided methods
fn nested_value(&self) -> Option<&Value> { ... }
fn has_wildcard(&self) -> bool { ... }
fn sort_list(list: &mut [Self], up: bool) { ... }
fn is_sortable(&self) -> bool { ... }
fn dbg_validate(arr: &Array<Self>) { ... }
}Expand description
A trait for types that can be used as array elements
Required Associated Constants§
Required Methods§
Sourcefn get_scalar_fill(fill: &Fill<'_>) -> Result<FillValue<Self>, &'static str>
fn get_scalar_fill(fill: &Fill<'_>) -> Result<FillValue<Self>, &'static str>
Get the scalar fill value from the environment
Sourcefn get_array_fill(
fill: &Fill<'_>,
) -> Result<FillValue<Array<Self>>, &'static str>
fn get_array_fill( fill: &Fill<'_>, ) -> Result<FillValue<Array<Self>>, &'static str>
Get the array fill value from the environment
Sourcefn array_hash<H: Hasher>(&self, hasher: &mut H)
fn array_hash<H: Hasher>(&self, hasher: &mut H)
Hash the value
Provided Methods§
Sourcefn nested_value(&self) -> Option<&Value>
fn nested_value(&self) -> Option<&Value>
Get a nested value
Sourcefn has_wildcard(&self) -> bool
fn has_wildcard(&self) -> bool
Check if this element has the wildcard value
Sourcefn is_sortable(&self) -> bool
fn is_sortable(&self) -> bool
Whether this value can be sorted
Sourcefn dbg_validate(arr: &Array<Self>)
fn dbg_validate(arr: &Array<Self>)
Validate array correctness in debug mode
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.