pub struct Block {Show 19 fields
pub id: BlockId,
pub ast: AstNode,
pub state: BlockState,
pub tables: Database,
pub plan: Plan,
pub functions: Option<Rc<RefCell<Functions>>>,
pub user_functions: Option<Rc<RefCell<HashMap<u64, UserFunction>>>>,
pub global_database: Rc<RefCell<Database>>,
pub unsatisfied_transformation: Option<(MechError, Transformation)>,
pub pending_transformations: Vec<Transformation>,
pub pending_global_tables: HashMap<u64, TableRef>,
pub transformations: Vec<Transformation>,
pub defined_tables: HashSet<(TableId, RegisterIndex, RegisterIndex)>,
pub required_functions: HashSet<u64>,
pub strings: StringDictionary,
pub triggers: HashSet<(TableId, RegisterIndex, RegisterIndex)>,
pub input: HashSet<(TableId, RegisterIndex, RegisterIndex)>,
pub output: HashSet<(TableId, RegisterIndex, RegisterIndex)>,
pub dynamic_tables: HashSet<(TableId, RegisterIndex, RegisterIndex)>,
}Fields§
§id: BlockId§ast: AstNode§state: BlockState§tables: Database§plan: Plan§functions: Option<Rc<RefCell<Functions>>>§user_functions: Option<Rc<RefCell<HashMap<u64, UserFunction>>>>§global_database: Rc<RefCell<Database>>§unsatisfied_transformation: Option<(MechError, Transformation)>§pending_transformations: Vec<Transformation>§pending_global_tables: HashMap<u64, TableRef>§transformations: Vec<Transformation>§defined_tables: HashSet<(TableId, RegisterIndex, RegisterIndex)>§required_functions: HashSet<u64>§strings: StringDictionary§triggers: HashSet<(TableId, RegisterIndex, RegisterIndex)>§input: HashSet<(TableId, RegisterIndex, RegisterIndex)>§output: HashSet<(TableId, RegisterIndex, RegisterIndex)>§dynamic_tables: HashSet<(TableId, RegisterIndex, RegisterIndex)>Implementations§
source§impl Block
impl Block
pub fn new() -> Block
pub fn get_table( &self, table_id: &TableId, ) -> Result<Rc<RefCell<Table>>, MechError>
pub fn gen_id(&mut self) -> BlockId
pub fn id(&self) -> BlockId
pub fn recompile(&mut self) -> Result<(), MechError>
pub fn ready(&mut self) -> Result<(), MechError>
pub fn get_arg_column( &self, argument: &Argument, ) -> Result<(u64, Column, ColumnIndex), MechError>
pub fn get_arg_columns( &self, arguments: &Vec<Argument>, ) -> Result<Vec<(u64, Column, ColumnIndex)>, MechError>
pub fn get_whole_table_arg_cols( &self, argument: &Argument, ) -> Result<Vec<(u64, Column, ColumnIndex)>, MechError>
pub fn get_out_column( &self, out: &Out, rows: usize, col_kind: ValueKind, ) -> Result<Column, MechError>
pub fn get_arg_dims( &self, arguments: &Vec<Argument>, ) -> Result<Vec<TableShape>, MechError>
pub fn get_arg_dim(&self, argument: &Argument) -> Result<TableShape, MechError>
pub fn add_tfm(&mut self, tfm: Transformation) -> Result<(), MechError>
pub fn solve(&self) -> Result<(), MechError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Block
impl !RefUnwindSafe for Block
impl !Send for Block
impl !Sync for Block
impl Unpin for Block
impl !UnwindSafe for Block
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.