pub struct ExtensionArgs {
pub positional: Vec<ExtensionValue>,
pub named: IndexMap<String, ExtensionValue>,
pub output_columns: Vec<ExtensionColumn>,
}Expand description
Represents extension arguments plus optional output columns.
Named arguments are stored in an IndexMap whose iteration order
determines display order. Extension super::Explainable::to_args()
implementations should insert named arguments in the order they should
appear in the text format.
Fields§
§positional: Vec<ExtensionValue>Positional arguments.
named: IndexMap<String, ExtensionValue>Named arguments, displayed in the order they were inserted
output_columns: Vec<ExtensionColumn>Output columns for custom relation types.
Implementations§
Source§impl ExtensionArgs
impl ExtensionArgs
Sourcepub fn parse<T>(&self) -> Result<T, ExtensionError>where
T: Explainable,
pub fn parse<T>(&self) -> Result<T, ExtensionError>where
T: Explainable,
Decodes these arguments as an Explainable extension value.
If decoding succeeds, this method rejects any named or positional arguments the implementation did not access. If decoding fails, it returns that error without checking for unhandled arguments.
Sourcepub fn push<T>(&mut self, value: T)where
T: Into<ExtensionValue>,
pub fn push<T>(&mut self, value: T)where
T: Into<ExtensionValue>,
Push a positional extension argument.
Sourcepub fn insert<K, V>(&mut self, name: K, value: V) -> Option<ExtensionValue>
pub fn insert<K, V>(&mut self, name: K, value: V) -> Option<ExtensionValue>
Insert a named extension argument, returning any previous value.
Trait Implementations§
Source§impl Clone for ExtensionArgs
impl Clone for ExtensionArgs
Source§fn clone(&self) -> ExtensionArgs
fn clone(&self) -> ExtensionArgs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more