Cube

Struct Cube 

Source
#[repr(C, align(64))]
pub struct Cube { pub tables: Vec<Table>, pub n_rows: Vec<usize>, pub name: String, pub third_dim_index: Option<Vec<String>>, }
Expand description

§Cube - 3D Type for Advanced Analysis Use Cases

Holds a vector of tables unified by some value, often Time, for special indexing. Useful for data analysis.

§Purpose

Useful when the tables represent discrete time snapshots, or a category dimension. This enables comparing data without losing the underlying grain through aggregation, whilst still supporting that.

§Description

This is an optional extra enabled by the cube feature, and is not part of the Apache Arrow framework.

§Under Development

⚠️ Unstable API and WIP: expect future development. Breaking changes will be minimised, but avoid using this in production unless you are ready to wear API adjustments.

Fields§

§tables: Vec<Table>

Table entries forming the cube (rectangular prism)

§n_rows: Vec<usize>

Number of rows in each table

§name: String

Cube name

§third_dim_index: Option<Vec<String>>

Implementations§

Source§

impl Cube

Source

pub fn new( name: String, cols: Option<Vec<FieldArray>>, third_dim_index: Option<Vec<String>>, ) -> Self

Constructs a new Cube with a specified name and optional set of columns. If cols is provided, the columns are used to create the first table. The number of rows will be inferred from the first column. If the name is empty or whitespace, a unique default name is assigned. If no columns are provided, the Cube will be empty.

Examples found in repository?
examples/broadcasting/test_broadcasting.rs (line 417)
402fn test_cube_broadcasting() {
403    #[cfg(feature = "cube")]
404    {
405        println!("┌─ Test 12: Cube (3D) Broadcasting");
406        println!("│  Operation: Cube{{2 tables}} + Cube{{2 tables}}");
407        println!("│  Expected:  Element-wise addition across all tables");
408
409        // Create first cube with 2 tables
410        // First, create columns for table 1
411        let t1_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![1, 2]));
412        let t1_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![3, 4]));
413        let t1_fa1 = minarrow::FieldArray::from_arr("col1", t1_arr1);
414        let t1_fa2 = minarrow::FieldArray::from_arr("col2", t1_arr2);
415
416        // Create columns for cube1 via constructor
417        let mut cube1 = Cube::new("cube1".to_string(), Some(vec![t1_fa1, t1_fa2]), None);
418
419        // Add second table to cube1
420        let t2_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![5, 6]));
421        let t2_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![7, 8]));
422        let t2_fa1 = minarrow::FieldArray::from_arr("col1", t2_arr1);
423        let t2_fa2 = minarrow::FieldArray::from_arr("col2", t2_arr2);
424        let mut table2 = Table::new("t2".to_string(), None);
425        table2.add_col(t2_fa1);
426        table2.add_col(t2_fa2);
427        cube1.add_table(table2);
428
429        // Create second cube
430        let t3_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![10, 10]));
431        let t3_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![20, 20]));
432        let t3_fa1 = minarrow::FieldArray::from_arr("col1", t3_arr1);
433        let t3_fa2 = minarrow::FieldArray::from_arr("col2", t3_arr2);
434        let mut cube2 = Cube::new("cube2".to_string(), Some(vec![t3_fa1, t3_fa2]), None);
435
436        let t4_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![30, 30]));
437        let t4_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![40, 40]));
438        let t4_fa1 = minarrow::FieldArray::from_arr("col1", t4_arr1);
439        let t4_fa2 = minarrow::FieldArray::from_arr("col2", t4_arr2);
440        let mut table4 = Table::new("t4".to_string(), None);
441        table4.add_col(t4_fa1);
442        table4.add_col(t4_fa2);
443        cube2.add_table(table4);
444
445        match Value::Cube(Arc::new(cube1)) + Value::Cube(Arc::new(cube2)) {
446            Ok(Value::Cube(result)) => {
447                println!("│  Result cube with {} tables:", result.n_tables());
448                for i in 0..result.n_tables() {
449                    println!("│  Table {}:", i);
450                    if let Some(table) = result.table(i) {
451                        for j in 0..table.n_cols() {
452                            let col = &table.cols[j];
453                            if let Array::NumericArray(NumericArray::Int32(arr)) = &col.array {
454                                println!("│    Column {}: {:?}", j, arr.data.as_slice());
455                            }
456                        }
457                    }
458                }
459                println!("└─ ✓ Passed\n");
460            }
461            Ok(other) => println!("└─ ✗ Error: Unexpected result type {:?}\n", other),
462            Err(e) => println!("└─ ✗ Error: {:?}\n", e),
463        }
464    }
465
466    #[cfg(not(feature = "cube"))]
467    {
468        println!("┌─ Test 12: Cube (3D) Broadcasting");
469        println!("└─ ⊘ Skipped (cube feature not enabled)\n");
470    }
471}
Source

pub fn new_empty() -> Self

Constructs a new, empty Cube with a globally unique name.

Source

pub fn add_table(&mut self, table: Table)

Adds a table to the cube.

Examples found in repository?
examples/broadcasting/test_broadcasting.rs (line 427)
402fn test_cube_broadcasting() {
403    #[cfg(feature = "cube")]
404    {
405        println!("┌─ Test 12: Cube (3D) Broadcasting");
406        println!("│  Operation: Cube{{2 tables}} + Cube{{2 tables}}");
407        println!("│  Expected:  Element-wise addition across all tables");
408
409        // Create first cube with 2 tables
410        // First, create columns for table 1
411        let t1_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![1, 2]));
412        let t1_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![3, 4]));
413        let t1_fa1 = minarrow::FieldArray::from_arr("col1", t1_arr1);
414        let t1_fa2 = minarrow::FieldArray::from_arr("col2", t1_arr2);
415
416        // Create columns for cube1 via constructor
417        let mut cube1 = Cube::new("cube1".to_string(), Some(vec![t1_fa1, t1_fa2]), None);
418
419        // Add second table to cube1
420        let t2_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![5, 6]));
421        let t2_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![7, 8]));
422        let t2_fa1 = minarrow::FieldArray::from_arr("col1", t2_arr1);
423        let t2_fa2 = minarrow::FieldArray::from_arr("col2", t2_arr2);
424        let mut table2 = Table::new("t2".to_string(), None);
425        table2.add_col(t2_fa1);
426        table2.add_col(t2_fa2);
427        cube1.add_table(table2);
428
429        // Create second cube
430        let t3_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![10, 10]));
431        let t3_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![20, 20]));
432        let t3_fa1 = minarrow::FieldArray::from_arr("col1", t3_arr1);
433        let t3_fa2 = minarrow::FieldArray::from_arr("col2", t3_arr2);
434        let mut cube2 = Cube::new("cube2".to_string(), Some(vec![t3_fa1, t3_fa2]), None);
435
436        let t4_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![30, 30]));
437        let t4_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![40, 40]));
438        let t4_fa1 = minarrow::FieldArray::from_arr("col1", t4_arr1);
439        let t4_fa2 = minarrow::FieldArray::from_arr("col2", t4_arr2);
440        let mut table4 = Table::new("t4".to_string(), None);
441        table4.add_col(t4_fa1);
442        table4.add_col(t4_fa2);
443        cube2.add_table(table4);
444
445        match Value::Cube(Arc::new(cube1)) + Value::Cube(Arc::new(cube2)) {
446            Ok(Value::Cube(result)) => {
447                println!("│  Result cube with {} tables:", result.n_tables());
448                for i in 0..result.n_tables() {
449                    println!("│  Table {}:", i);
450                    if let Some(table) = result.table(i) {
451                        for j in 0..table.n_cols() {
452                            let col = &table.cols[j];
453                            if let Array::NumericArray(NumericArray::Int32(arr)) = &col.array {
454                                println!("│    Column {}: {:?}", j, arr.data.as_slice());
455                            }
456                        }
457                    }
458                }
459                println!("└─ ✓ Passed\n");
460            }
461            Ok(other) => println!("└─ ✗ Error: Unexpected result type {:?}\n", other),
462            Err(e) => println!("└─ ✗ Error: {:?}\n", e),
463        }
464    }
465
466    #[cfg(not(feature = "cube"))]
467    {
468        println!("┌─ Test 12: Cube (3D) Broadcasting");
469        println!("└─ ⊘ Skipped (cube feature not enabled)\n");
470    }
471}
Source

pub fn schema(&self) -> Vec<Arc<Field>>

Gets the schemea from the first table as representative of the rest

Source

pub fn n_tables(&self) -> usize

Returns the number of tables.

Examples found in repository?
examples/broadcasting/test_broadcasting.rs (line 447)
402fn test_cube_broadcasting() {
403    #[cfg(feature = "cube")]
404    {
405        println!("┌─ Test 12: Cube (3D) Broadcasting");
406        println!("│  Operation: Cube{{2 tables}} + Cube{{2 tables}}");
407        println!("│  Expected:  Element-wise addition across all tables");
408
409        // Create first cube with 2 tables
410        // First, create columns for table 1
411        let t1_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![1, 2]));
412        let t1_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![3, 4]));
413        let t1_fa1 = minarrow::FieldArray::from_arr("col1", t1_arr1);
414        let t1_fa2 = minarrow::FieldArray::from_arr("col2", t1_arr2);
415
416        // Create columns for cube1 via constructor
417        let mut cube1 = Cube::new("cube1".to_string(), Some(vec![t1_fa1, t1_fa2]), None);
418
419        // Add second table to cube1
420        let t2_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![5, 6]));
421        let t2_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![7, 8]));
422        let t2_fa1 = minarrow::FieldArray::from_arr("col1", t2_arr1);
423        let t2_fa2 = minarrow::FieldArray::from_arr("col2", t2_arr2);
424        let mut table2 = Table::new("t2".to_string(), None);
425        table2.add_col(t2_fa1);
426        table2.add_col(t2_fa2);
427        cube1.add_table(table2);
428
429        // Create second cube
430        let t3_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![10, 10]));
431        let t3_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![20, 20]));
432        let t3_fa1 = minarrow::FieldArray::from_arr("col1", t3_arr1);
433        let t3_fa2 = minarrow::FieldArray::from_arr("col2", t3_arr2);
434        let mut cube2 = Cube::new("cube2".to_string(), Some(vec![t3_fa1, t3_fa2]), None);
435
436        let t4_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![30, 30]));
437        let t4_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![40, 40]));
438        let t4_fa1 = minarrow::FieldArray::from_arr("col1", t4_arr1);
439        let t4_fa2 = minarrow::FieldArray::from_arr("col2", t4_arr2);
440        let mut table4 = Table::new("t4".to_string(), None);
441        table4.add_col(t4_fa1);
442        table4.add_col(t4_fa2);
443        cube2.add_table(table4);
444
445        match Value::Cube(Arc::new(cube1)) + Value::Cube(Arc::new(cube2)) {
446            Ok(Value::Cube(result)) => {
447                println!("│  Result cube with {} tables:", result.n_tables());
448                for i in 0..result.n_tables() {
449                    println!("│  Table {}:", i);
450                    if let Some(table) = result.table(i) {
451                        for j in 0..table.n_cols() {
452                            let col = &table.cols[j];
453                            if let Array::NumericArray(NumericArray::Int32(arr)) = &col.array {
454                                println!("│    Column {}: {:?}", j, arr.data.as_slice());
455                            }
456                        }
457                    }
458                }
459                println!("└─ ✓ Passed\n");
460            }
461            Ok(other) => println!("└─ ✗ Error: Unexpected result type {:?}\n", other),
462            Err(e) => println!("└─ ✗ Error: {:?}\n", e),
463        }
464    }
465
466    #[cfg(not(feature = "cube"))]
467    {
468        println!("┌─ Test 12: Cube (3D) Broadcasting");
469        println!("└─ ⊘ Skipped (cube feature not enabled)\n");
470    }
471}
Source

pub fn n_rows(&self) -> Vec<usize>

Returns the number of rows

Source

pub fn n_cols(&self) -> usize

Returns the number of columns.

Source

pub fn is_empty(&self) -> bool

Returns true if the cube is empty (no tables, no columns or no rows).

Source

pub fn table(&self, idx: usize) -> Option<&Table>

Returns a reference to a table by index.

Examples found in repository?
examples/broadcasting/test_broadcasting.rs (line 450)
402fn test_cube_broadcasting() {
403    #[cfg(feature = "cube")]
404    {
405        println!("┌─ Test 12: Cube (3D) Broadcasting");
406        println!("│  Operation: Cube{{2 tables}} + Cube{{2 tables}}");
407        println!("│  Expected:  Element-wise addition across all tables");
408
409        // Create first cube with 2 tables
410        // First, create columns for table 1
411        let t1_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![1, 2]));
412        let t1_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![3, 4]));
413        let t1_fa1 = minarrow::FieldArray::from_arr("col1", t1_arr1);
414        let t1_fa2 = minarrow::FieldArray::from_arr("col2", t1_arr2);
415
416        // Create columns for cube1 via constructor
417        let mut cube1 = Cube::new("cube1".to_string(), Some(vec![t1_fa1, t1_fa2]), None);
418
419        // Add second table to cube1
420        let t2_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![5, 6]));
421        let t2_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![7, 8]));
422        let t2_fa1 = minarrow::FieldArray::from_arr("col1", t2_arr1);
423        let t2_fa2 = minarrow::FieldArray::from_arr("col2", t2_arr2);
424        let mut table2 = Table::new("t2".to_string(), None);
425        table2.add_col(t2_fa1);
426        table2.add_col(t2_fa2);
427        cube1.add_table(table2);
428
429        // Create second cube
430        let t3_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![10, 10]));
431        let t3_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![20, 20]));
432        let t3_fa1 = minarrow::FieldArray::from_arr("col1", t3_arr1);
433        let t3_fa2 = minarrow::FieldArray::from_arr("col2", t3_arr2);
434        let mut cube2 = Cube::new("cube2".to_string(), Some(vec![t3_fa1, t3_fa2]), None);
435
436        let t4_arr1 = Array::from_int32(IntegerArray::from_slice(&vec64![30, 30]));
437        let t4_arr2 = Array::from_int32(IntegerArray::from_slice(&vec64![40, 40]));
438        let t4_fa1 = minarrow::FieldArray::from_arr("col1", t4_arr1);
439        let t4_fa2 = minarrow::FieldArray::from_arr("col2", t4_arr2);
440        let mut table4 = Table::new("t4".to_string(), None);
441        table4.add_col(t4_fa1);
442        table4.add_col(t4_fa2);
443        cube2.add_table(table4);
444
445        match Value::Cube(Arc::new(cube1)) + Value::Cube(Arc::new(cube2)) {
446            Ok(Value::Cube(result)) => {
447                println!("│  Result cube with {} tables:", result.n_tables());
448                for i in 0..result.n_tables() {
449                    println!("│  Table {}:", i);
450                    if let Some(table) = result.table(i) {
451                        for j in 0..table.n_cols() {
452                            let col = &table.cols[j];
453                            if let Array::NumericArray(NumericArray::Int32(arr)) = &col.array {
454                                println!("│    Column {}: {:?}", j, arr.data.as_slice());
455                            }
456                        }
457                    }
458                }
459                println!("└─ ✓ Passed\n");
460            }
461            Ok(other) => println!("└─ ✗ Error: Unexpected result type {:?}\n", other),
462            Err(e) => println!("└─ ✗ Error: {:?}\n", e),
463        }
464    }
465
466    #[cfg(not(feature = "cube"))]
467    {
468        println!("┌─ Test 12: Cube (3D) Broadcasting");
469        println!("└─ ⊘ Skipped (cube feature not enabled)\n");
470    }
471}
Source

pub fn table_mut(&mut self, idx: usize) -> Option<&mut Table>

Returns a mutable reference to a table by index.

Source

pub fn table_names(&self) -> Vec<&str>

Returns the names of all tables in the cube.

Source

pub fn table_index(&self, name: &str) -> Option<usize>

Returns the index of a table by name.

Source

pub fn has_table(&self, name: &str) -> bool

Checks if a table with the given name exists.

Source

pub fn remove_table_at(&mut self, idx: usize) -> bool

Removes a table by index.

Source

pub fn remove_table(&mut self, name: &str) -> bool

Removes a table by name.

Source

pub fn clear(&mut self)

Clears all tables and resets row counts.

Source

pub fn tables(&self) -> &[Table]

Returns an immutable reference to all tables.

Source

pub fn tables_mut(&mut self) -> &mut [Table]

Returns a mutable reference to all tables.

Source

pub fn iter_tables(&self) -> Iter<'_, Table>

Returns an iterator over all tables.

Source

pub fn iter_tables_mut(&mut self) -> IterMut<'_, Table>

Source

pub fn col_names(&self) -> Vec<&str>

Returns the list of column names (from the first table).

Source

pub fn col_index(&self, name: &str) -> Option<usize>

Returns the index of a column by name (from the first table).

Source

pub fn has_col(&self, name: &str) -> bool

Returns true if the cube has a column of the given name (in all tables).

Source

pub fn col(&self, idx: usize) -> Option<Vec<&FieldArray>>

Returns all columns (FieldArrays) with the given index across all tables.

Source

pub fn col_by_name(&self, name: &str) -> Option<Vec<&FieldArray>>

Returns all columns (FieldArrays) with the given name across all tables.

Source

pub fn cols(&self) -> Vec<Vec<&FieldArray>>

Returns all columns for all tables as Vec<Vec<&FieldArray>>.

Source

pub fn remove_col(&mut self, name: &str) -> bool

Removes a column by name from all tables. Returns true if removed from all.

Source

pub fn remove_col_at(&mut self, idx: usize) -> bool

Removes a column by index from all tables. Returns true if removed from all.

Source

pub fn iter_cols( &self, col_idx: usize, ) -> Option<impl Iterator<Item = &FieldArray>>

Returns an iterator over the specified column across all tables.

Source

pub fn iter_cols_by_name<'a>( &'a self, name: &'a str, ) -> Option<impl Iterator<Item = &'a FieldArray> + 'a>

Returns an iterator over the named column across all tables.

Source

pub fn set_third_dim_index<S: Into<String>>(&mut self, cols: Vec<S>)

Sets the third dimensional index

Source

pub fn third_dim_index(&self) -> Option<&[String]>

Retrieves the third dimensional index

Source

pub fn slice_clone(&self, offset: usize, len: usize) -> Self

Returns a new owned Cube containing rows [offset, offset+len) for all tables.

Source

pub fn slice(&self, offset: usize, len: usize) -> CubeV

Returns a zero-copy view over rows [offset, offset+len) for all tables.

Source

pub fn par_iter_tables(&self) -> Iter<'_, Table>

Returns a parallel iterator over all tables.

Source

pub fn par_iter_tables_mut(&mut self) -> IterMut<'_, Table>

Returns a parallel mutable iterator over all tables.

Trait Implementations§

Source§

impl Add for Cube

Available on crate feature cube only.
Source§

type Output = Result<Cube, MinarrowError>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl ByteSize for Cube

Available on crate feature cube only.
Source§

fn est_bytes(&self) -> usize

Returns the estimated byte size of this object in memory. Read more
Source§

impl Clone for Cube

Source§

fn clone(&self) -> Cube

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Concatenate for Cube

Source§

fn concat(self, other: Self) -> Result<Self, MinarrowError>

Concatenates two cubes by appending all tables from other to self.

§Requirements
  • Both cubes must have the same schema (column names and types)
§Returns

A new Cube containing all tables from self followed by all tables from other

§Errors
  • IncompatibleTypeError if schemas don’t match
Source§

impl Debug for Cube

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Cube

Source§

fn default() -> Cube

Returns the “default value” for a type. Read more
Source§

impl Div for Cube

Available on crate feature cube only.
Source§

type Output = Result<Cube, MinarrowError>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl From<Cube> for Value

Available on crate feature cube only.
Source§

fn from(v: Cube) -> Self

Converts to this type from the input type.
Source§

impl<'a> IntoIterator for &'a Cube

Source§

type Item = &'a Table

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a, Table>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a> IntoIterator for &'a mut Cube

Source§

type Item = &'a mut Table

The type of the elements being iterated over.
Source§

type IntoIter = IterMut<'a, Table>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl IntoIterator for Cube

Source§

type Item = Table

The type of the elements being iterated over.
Source§

type IntoIter = <Vec<Table> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl Mul for Cube

Available on crate feature cube only.
Source§

type Output = Result<Cube, MinarrowError>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl PartialEq for Cube

Source§

fn eq(&self, other: &Cube) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Rem for Cube

Available on crate feature cube only.
Source§

type Output = Result<Cube, MinarrowError>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl Shape for Cube

Source§

fn shape(&self) -> ShapeDim

Returns arbitrary Shape dimension for any data shape
Source§

fn shape_1d(&self) -> usize

Returns the first dimension shape Read more
Source§

fn shape_2d(&self) -> (usize, usize)

Returns the first and second dimension shapes Read more
Source§

fn shape_3d(&self) -> (usize, usize, usize)

Returns the first, second and third dimension shapes Read more
Source§

fn shape_4d(&self) -> (usize, usize, usize, usize)

Returns the first, second, third and fourth dimension shapes Read more
Source§

impl Sub for Cube

Available on crate feature cube only.
Source§

type Output = Result<Cube, MinarrowError>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl TryFrom<Value> for Cube

Available on crate feature cube only.
Source§

type Error = MinarrowError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl StructuralPartialEq for Cube

Auto Trait Implementations§

§

impl Freeze for Cube

§

impl RefUnwindSafe for Cube

§

impl Send for Cube

§

impl Sync for Cube

§

impl Unpin for Cube

§

impl UnwindSafe for Cube

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> CustomValue for T
where T: Any + Send + Sync + Clone + PartialEq + Debug,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Downcasts the type as Any
Source§

fn deep_clone(&self) -> Arc<dyn CustomValue>

Returns a deep clone of the object. Read more
Source§

fn eq_box(&self, other: &(dyn CustomValue + 'static)) -> bool

Performs semantic equality on the boxed object. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<I> IntoStreamingIterator for I
where I: IntoIterator,

Source§

fn into_streaming_iter(self) -> Convert<Self::IntoIter>

Source§

fn into_streaming_iter_ref<'a, T>(self) -> ConvertRef<'a, Self::IntoIter, T>
where Self: IntoIterator<Item = &'a T>, T: ?Sized,

Turns an IntoIterator of references into a StreamingIterator. Read more
Source§

fn into_streaming_iter_mut<'a, T>(self) -> ConvertMut<'a, Self::IntoIter, T>
where Self: IntoIterator<Item = &'a mut T>, T: ?Sized,

Turns an IntoIterator of mutable references into a StreamingIteratorMut. Read more
Source§

impl<T> Key for T
where T: Clone,

Source§

fn align() -> usize

The alignment necessary for the key. Must return a power of two.
Source§

fn size(&self) -> usize

The size of the key in bytes.
Source§

unsafe fn init(&self, ptr: *mut u8)

Initialize the key in the given memory location. Read more
Source§

unsafe fn get<'a>(ptr: *const u8) -> &'a T

Get a reference to the key from the given memory location. Read more
Source§

unsafe fn drop_in_place(ptr: *mut u8)

Drop the key in place. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T> PlanCallbackArgs for T

Source§

impl<T> PlanCallbackOut for T