pub trait ArrayValue:
Default
+ Clone
+ Debug
+ Display
+ GridFmt
+ ArrayCmp
+ Send
+ Sync
+ 'static {
const NAME: &'static str;
const SYMBOL: char;
const TYPE_ID: u8;
Show 15 methods
// Required methods
fn get_scalar_fill(fill: &Fill<'_>) -> Result<Self, &'static str>;
fn get_array_fill(fill: &Fill<'_>) -> Result<Array<Self>, &'static str>;
fn array_hash<H: Hasher>(&self, hasher: &mut H);
fn proxy() -> Self;
// Provided methods
fn format_delims() -> (&'static str, &'static str) { ... }
fn empty_list_inner() -> &'static str { ... }
fn format_sep() -> &'static str { ... }
fn grid_fmt_delims(boxed: bool) -> (char, char) { ... }
fn compress_list_grid() -> bool { ... }
fn nested_value(&self) -> Option<&Value> { ... }
fn has_wildcard(&self) -> bool { ... }
fn summarize(elems: &[Self]) -> String { ... }
fn summary_min_elems() -> usize { ... }
fn alignment() -> ElemAlign { ... }
fn max_col_width<'a>(
rows: impl Iterator<Item = &'a [char]> + Clone,
) -> usize { ... }
}
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<Self, &'static str>
fn get_scalar_fill(fill: &Fill<'_>) -> Result<Self, &'static str>
Get the scalar fill value from the environment
Sourcefn get_array_fill(fill: &Fill<'_>) -> Result<Array<Self>, &'static str>
fn get_array_fill(fill: &Fill<'_>) -> Result<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 format_delims() -> (&'static str, &'static str)
fn format_delims() -> (&'static str, &'static str)
Delimiters for formatting
Sourcefn empty_list_inner() -> &'static str
fn empty_list_inner() -> &'static str
Marker for empty lists in grid formatting
Sourcefn format_sep() -> &'static str
fn format_sep() -> &'static str
Separator for formatting
Sourcefn grid_fmt_delims(boxed: bool) -> (char, char)
fn grid_fmt_delims(boxed: bool) -> (char, char)
Delimiters for grid formatting
Sourcefn compress_list_grid() -> bool
fn compress_list_grid() -> bool
Whether to compress all items of a list when grid formatting
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 summary_min_elems() -> usize
fn summary_min_elems() -> usize
The minimum number of elements that require a summary
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.