pub enum GetFieldAccessSchema {
NamedStructField {
name: ScalarValue,
},
ListIndex {
key_dt: DataType,
},
ListRange {
start_dt: DataType,
stop_dt: DataType,
stride_dt: DataType,
},
}Expand description
Types of the field access expression of a nested type, such as Field or List
Variants§
NamedStructField
Named field, For example struct["name"]
Fields
§
name: ScalarValueListIndex
Single list index, for example: list[i]
ListRange
List stride, for example list[i:j:k]
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_typeis not a Struct or a List, - the
data_typeof the name/index/start-stop do not match a supported index type
Auto Trait Implementations§
impl Freeze for GetFieldAccessSchema
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