Trait mz_transform::attribute::Attribute
source · pub trait Attribute {
type Value: Clone + Eq + PartialEq;
// Required methods
fn derive(&mut self, expr: &MirRelationExpr, deps: &DerivedAttributes<'_>);
fn add_dependencies(builder: &mut DerivedAttributesBuilder<'_>);
fn get_results(&self) -> &Vec<Self::Value>;
fn get_results_mut(&mut self) -> &mut Vec<Self::Value>;
fn take(self) -> Vec<Self::Value>;
// Provided methods
fn schedule_env_tasks(&mut self, _expr: &MirRelationExpr) { ... }
fn handle_env_tasks(&mut self) { ... }
}
Expand description
A common interface to be implemented by all derived attributes.
Required Associated Types§
Required Methods§
sourcefn derive(&mut self, expr: &MirRelationExpr, deps: &DerivedAttributes<'_>)
fn derive(&mut self, expr: &MirRelationExpr, deps: &DerivedAttributes<'_>)
Derive an attribute.
sourcefn add_dependencies(builder: &mut DerivedAttributesBuilder<'_>)
fn add_dependencies(builder: &mut DerivedAttributesBuilder<'_>)
The attribute ids of all other attributes that this attribute depends on.
sourcefn get_results(&self) -> &Vec<Self::Value>
fn get_results(&self) -> &Vec<Self::Value>
Attributes for each subexpression, visited in post-order.
sourcefn get_results_mut(&mut self) -> &mut Vec<Self::Value>
fn get_results_mut(&mut self) -> &mut Vec<Self::Value>
Mutable attributes for each subexpression, visited in post-order.
Provided Methods§
sourcefn schedule_env_tasks(&mut self, _expr: &MirRelationExpr)
fn schedule_env_tasks(&mut self, _expr: &MirRelationExpr)
Schedule environment maintenance tasks.
Delegate to Env::schedule_tasks
if this attribute has an Env
field.
sourcefn handle_env_tasks(&mut self)
fn handle_env_tasks(&mut self)
Handle scheduled environment maintenance tasks.
Delegate to Env::handle_tasks
if this attribute has an Env
field.
Object Safety§
This trait is not object safe.