pub trait TypedGetData<'a, T> {
// Required method
fn get_opt(
&'a self,
row_index: usize,
field_name: &str,
) -> DeltaResult<Option<T>>;
// Provided method
fn get(&'a self, row_index: usize, field_name: &str) -> DeltaResult<T> { ... }
}Expand description
This is a convenience wrapper over GetData to allow code like: let name: Option<String> = getters[1].get_opt(row_index, "metadata.name")?;
Required Methods§
Provided Methods§
fn get(&'a self, row_index: usize, field_name: &str) -> DeltaResult<T>
Implementors§
impl<'a> TypedGetData<'a, &'a str> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, &'a [u8]> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, bool> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, f32> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, f64> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, i8> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, i16> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, i32> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, i64> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, i128> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, String> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, Vec<String>> for dyn GetData<'a> + '_
Provide an impl to get a list field as a Vec<String>. Note that this will allocate the vector
and allocate for each string entry.
impl<'a> TypedGetData<'a, HashMap<String, String>> for dyn GetData<'a> + '_
Provide an impl to get a map field as a HashMap<String, String>. Note that this will
allocate the map and allocate for each entry