re_sorbet::metadata

Trait MetadataExt

Source
pub trait MetadataExt {
    type Error;

    // Required methods
    fn missing_key_error(&self, key: &str) -> Self::Error;
    fn get_opt(&self, key: &str) -> Option<&str>;

    // Provided methods
    fn get_or_err(&self, key: &str) -> Result<&str, Self::Error> { ... }
    fn get_bool(&self, key: &str) -> bool { ... }
}
Expand description

Make it more ergonomic to work with arrow metadata.

Required Associated Types§

Required Methods§

Source

fn missing_key_error(&self, key: &str) -> Self::Error

Source

fn get_opt(&self, key: &str) -> Option<&str>

Provided Methods§

Source

fn get_or_err(&self, key: &str) -> Result<&str, Self::Error>

Source

fn get_bool(&self, key: &str) -> bool

If the key exists and is NOT false.

Implementations on Foreign Types§

Source§

impl MetadataExt for HashMap<String, String>

Source§

type Error = MissingMetadataKey

Source§

fn missing_key_error(&self, key: &str) -> Self::Error

Source§

fn get_opt(&self, key: &str) -> Option<&str>

Source§

impl MetadataExt for Field

Implementors§