pub enum GetFieldAccessSchema {
NamedStructField {
name: ScalarValue,
},
ListIndex {
key_dt: DataType,
},
ListRange {
start_dt: DataType,
stop_dt: DataType,
},
}
Expand description
Types of the field access expression of a nested type, such as Field
or List
Variants§
NamedStructField
Fields
§
name: ScalarValue
Named field, For example struct["name"]
ListIndex
Fields
§
key_dt: DataType
Single list index, for example: list[i]
ListRange
List range, for example list[i:j]
Implementations§
source§impl GetFieldAccessSchema
impl GetFieldAccessSchema
sourcepub fn get_accessed_field(&self, data_type: &DataType) -> Result<Field>
pub fn get_accessed_field(&self, data_type: &DataType) -> Result<Field>
Returns the schema [Field
] from a [DataType::List
] or
[DataType::Struct
] indexed by this structure
Error
Errors if
- the
data_type
is not a Struct or a List, - the
data_type
of the name/index/start-stop do not match a supported index type
Auto Trait Implementations§
impl RefUnwindSafe for GetFieldAccessSchema
impl Send for GetFieldAccessSchema
impl Sync for GetFieldAccessSchema
impl Unpin for GetFieldAccessSchema
impl UnwindSafe for GetFieldAccessSchema
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