#[non_exhaustive]pub enum MetadataValue {
String(String),
StringList(Vec<String>),
F64(f64),
I64(i64),
Bool(bool),
Tensor(Tensor),
}Expand description
Free-form metadata values attached to graphs and nodes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
String(String)
UTF-8 string.
StringList(Vec<String>)
List of UTF-8 strings.
Python’s metadata: Dict[str, Any] admits a list[str], which h5py
stores as a multi-element string dataset. Without this variant such a
file cannot be decoded at all, since Tensor carries only numeric
and boolean payloads.
F64(f64)
64-bit float.
I64(i64)
64-bit signed integer.
Bool(bool)
Boolean.
Tensor(Tensor)
Dense tensor.
Trait Implementations§
Source§impl Clone for MetadataValue
impl Clone for MetadataValue
Source§fn clone(&self) -> MetadataValue
fn clone(&self) -> MetadataValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetadataValue
impl Debug for MetadataValue
Source§impl PartialEq for MetadataValue
impl PartialEq for MetadataValue
impl StructuralPartialEq for MetadataValue
Auto Trait Implementations§
impl Freeze for MetadataValue
impl RefUnwindSafe for MetadataValue
impl Send for MetadataValue
impl Sync for MetadataValue
impl Unpin for MetadataValue
impl UnsafeUnpin for MetadataValue
impl UnwindSafe for MetadataValue
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