pub enum DisplayOptions {
MetadataOnly,
CommaSeparatedScalars {
omit_comma_after_space: bool,
},
TreeDisplay,
}
Expand description
Describe how to convert an array to a string.
See also: Array::display_as and DisplayArrayAs.
Variants§
MetadataOnly
Only the top-level encoding id and limited metadata: vortex.primitive(i16, len=5)
.
let array = buffer![0_i16, 1, 2, 3, 4].into_array();
assert_eq!(
format!("{}", array.display_as(DisplayOptions::MetadataOnly)),
"vortex.primitive(i16, len=5)",
);
CommaSeparatedScalars
Only the logical values of the array: [0i16, 1i16, 2i16, 3i16, 4i16]
.
let array = buffer![0_i16, 1, 2, 3, 4].into_array();
assert_eq!(
format!("{}", array.display_as(DisplayOptions::default())),
"[0i16, 1i16, 2i16, 3i16, 4i16]",
);
assert_eq!(
format!("{}", array.display_as(DisplayOptions::default())),
format!("{}", array.display_values()),
);
TreeDisplay
The tree of encodings and all metadata but no values.
let array = buffer![0_i16, 1, 2, 3, 4].into_array();
let expected = "root: vortex.primitive(i16, len=5) nbytes=10 B (100.00%)
metadata: EmptyMetadata
buffer (align=2): 10 B (100.00%)
";
assert_eq!(format!("{}", array.display_as(DisplayOptions::TreeDisplay)), expected);
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DisplayOptions
impl RefUnwindSafe for DisplayOptions
impl Send for DisplayOptions
impl Sync for DisplayOptions
impl Unpin for DisplayOptions
impl UnwindSafe for DisplayOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more