pub struct YamlData {
pub uri: Arc<NamedReference>,
pub data: NodeReference,
pub functions: HashMap<String, Arc<Function>>,
pub types: HashMap<String, Arc<DataType>>,
pub type_variations: HashMap<String, Arc<TypeVariation>>,
}Expand description
Data for a resolved YAML file.
Fields
uri: Arc<NamedReference>URI for the YAML file.
data: NodeReferenceReference to the parsed YAML data, if any.
functions: HashMap<String, Arc<Function>>Functions defined in this YAML file. Names are stored in lower case (Substrait’s name resolution is case-insensitive).
types: HashMap<String, Arc<DataType>>Types defined in this YAML file. Names are stored in lower case (Substrait’s name resolution is case-insensitive).
type_variations: HashMap<String, Arc<TypeVariation>>Type variations defined in this YAML file. Names are stored in lower case (Substrait’s name resolution is case-insensitive).
Implementations
sourceimpl YamlData
impl YamlData
sourcepub fn new(uri: Arc<NamedReference>) -> YamlData
pub fn new(uri: Arc<NamedReference>) -> YamlData
Constructs an empty YamlData object with an invalid reference to the data node. Everything still needs to be populated for this to become valid.
sourcepub fn resolve_function<S: ToString>(&self, name: S) -> Arc<Reference<Function>>
pub fn resolve_function<S: ToString>(&self, name: S) -> Arc<Reference<Function>>
Resolves a function defined in this YAML data block by name. Returns an unresolved reference if it does not exist.
sourcepub fn resolve_type<S: ToString>(&self, name: S) -> Arc<Reference<DataType>>
pub fn resolve_type<S: ToString>(&self, name: S) -> Arc<Reference<DataType>>
Resolves a type defined in this YAML data block by name. Returns an unresolved reference if it does not exist.
sourcepub fn resolve_type_variation<S: ToString>(
&self,
name: S
) -> Arc<Reference<TypeVariation>>
pub fn resolve_type_variation<S: ToString>(
&self,
name: S
) -> Arc<Reference<TypeVariation>>
Resolves a type variation defined in this YAML data block by name. Returns an unresolved reference if it does not exist.
Trait Implementations
impl StructuralPartialEq for YamlData
Auto Trait Implementations
impl !RefUnwindSafe for YamlData
impl Send for YamlData
impl Sync for YamlData
impl Unpin for YamlData
impl !UnwindSafe for YamlData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more