Struct Dataset

Source
pub struct Dataset<S: Schema> { /* private fields */ }
Expand description

A dataset in flat. The same dataset may be observed through multiple views.

// Note, explicit type annotation included for clarity.
// We encourage consumers to allow the compiler to infer the type implicitly.
let builder: Dataset<Schema1<f64>> = DatasetBuilder::new(Schemas::one("dim1")).build();

Implementations§

Source§

impl Dataset<Schema1<f64>>

Source

pub fn reflect_1st(&self) -> View1Full<'_, Schema1<f64>>

Take a reflective view of this 1-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the final dimension (1st), and use all other dimensions in the frame of the widget. The term ‘reflection’ refers to the fact that the value will appear in both in the frame and rendering of the widget.

r#"
Frame..   | Rendering....
(dim1, )  | aggregate(dim1)"#

Requires feature primitive_impls or pointer_impls.

  • primitive_impls: implemented for Schema1<T> where T = {f64, .., u8}.
  • pointer_impls: implemented for Schema1<Dt> where T: Clone + Into<f64>, Dt: Deref<Target = T>.
Source§

impl<T> Dataset<Schema2<T, f64>>

Source

pub fn reflect_2nd(&self) -> View2Full<'_, Schema2<T, f64>>

Take a reflective view of this 2-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the final dimension (2nd), and use all other dimensions in the frame of the widget. The term ‘reflection’ refers to the fact that the value will appear in both in the frame and rendering of the widget.

r#"
Frame..       | Rendering..
(dim1, dim2)  | aggregate(dim2)"#

Requires feature primitive_impls or pointer_impls.

  • primitive_impls: implemented for Schema2<_, U> where U = {f64, .., u8}.
  • pointer_impls: implemented for Schema2<_, Du> where U: Clone + Into<f64>, Du: Deref<Target = U>.
Source

pub fn view_2nd(&self) -> View2Regular<'_, Schema2<T, f64>>

Take a regular view of this 2-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the final dimension (2nd), and use all other dimensions in the frame of the widget.

r#"
Frame..   | Rendering..
(dim1, )  | aggregate(dim2)"#

Requires feature primitive_impls or pointer_impls.

  • primitive_impls: implemented for Schema2<_, U> where U = {f64, .., u8}.
  • pointer_impls: implemented for Schema2<_, Du> where U: Clone + Into<f64>, Du: Deref<Target = U>.
Source

pub fn breakdown_2nd(&self) -> View2Breakdown2nd<'_, Schema2<T, f64>>

Take a breakdown view of this 2-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the breakdown of the final dimension (2nd), and use all other dimensions in the frame of the widget.

r#"
Frame..   | Breakdown Rendering..              |
(dim1, )  | breakdown(dim2, aggregate(dim2)).. |"#

Requires feature primitive_impls or pointer_impls.

  • primitive_impls: implemented for Schema2<_, U> where U = {f64, .., u8}.
  • pointer_impls: implemented for Schema2<_, Du> where U: Clone + Into<f64>, Du: Deref<Target = U>.
Source§

impl<T, U> Dataset<Schema3<T, U, f64>>

Source

pub fn reflect_3rd(&self) -> View3Full<'_, Schema3<T, U, f64>>

Take a reflective view of this 3-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the final dimension (3rd), and use all other dimensions in the frame of the widget. The term ‘reflection’ refers to the fact that the value will appear in both in the frame and rendering of the widget.

r#"
Frame..             | Rendering..
(dim1, dim2, dim3)  | aggregate(dim3)"#

Requires feature primitive_impls or pointer_impls.

  • primitive_impls: implemented for Schema3<_, _, V> where V = {f64, .., u8}.
  • pointer_impls: implemented for Schema3<_, _, Dv> where V: Clone + Into<f64>, Dv: Deref<Target = V>.
Source

pub fn view_3rd(&self) -> View3Regular<'_, Schema3<T, U, f64>>

Take a regular view of this 3-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the final dimension (3rd), and use all other dimensions in the frame of the widget.

r#"
Frame..       | Rendering..
(dim1, dim2)  | aggregate(dim3)"#

Requires feature primitive_impls or pointer_impls.

  • primitive_impls: implemented for Schema3<_, _, V> where V = {f64, .., u8}.
  • pointer_impls: implemented for Schema3<_, _, Dv> where V: Clone + Into<f64>, Dv: Deref<Target = V>.
Source

pub fn breakdown_3rd(&self) -> View3Breakdown3rd<'_, Schema3<T, U, f64>>

Take a breakdown view of this 3-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the breakdown of the final dimension (3rd), and use all other dimensions in the frame of the widget.

r#"
Frame..       | Breakdown Rendering..              |
(dim1, dim2)  | breakdown(dim3, aggregate(dim3)).. |"#

Requires feature primitive_impls or pointer_impls.

  • primitive_impls: implemented for Schema3<_, _, V> where V = {f64, .., u8}.
  • pointer_impls: implemented for Schema3<_, _, Dv> where V: Clone + Into<f64>, Dv: Deref<Target = V>.
Source

pub fn view_3rd_breakdown_2nd( &self, ) -> View3Breakdown2ndView3rd<'_, Schema3<T, U, f64>>

Take a view+breakdown view of this 3-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the final dimension (3rd) under a breakdown of the next dimension (2nd), and use all other dimensions in the frame of the widget.

r#"
Frame..   | Breakdown Rendering..              |
(dim1, )  | breakdown(dim2, aggregate(dim3)).. |"#

Requires feature primitive_impls or pointer_impls.

  • primitive_impls: implemented for Schema3<_, _, V> where V = {f64, .., u8}.
  • pointer_impls: implemented for Schema3<_, _, Dv> where V: Clone + Into<f64>, Dv: Deref<Target = V>.
Source§

impl<T, U, V> Dataset<Schema4<T, U, V, f64>>

Source

pub fn reflect_4th(&self) -> View4Full<'_, Schema4<T, U, V, f64>>

Take a reflective view of this 4-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the final dimension (4th), and use all other dimensions in the frame of the widget. The term ‘reflection’ refers to the fact that the value will appear in both in the frame and rendering of the widget.

r#"
Frame..                   | Rendering..
(dim1, dim2, dim3, dim4)  | aggregate(dim4)"#

Requires feature primitive_impls or pointer_impls.

  • primitive_impls: implemented for Schema4<_, _, _, W> where W = {f64, .., u8}.
  • pointer_impls: implemented for Schema4<_, _, _, Dw> where W: Clone + Into<f64>, Dw: Deref<Target = W>.
Source

pub fn view_4th(&self) -> View4Regular<'_, Schema4<T, U, V, f64>>

Take a regular view of this 4-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the final dimension (4th), and use all other dimensions in the frame of the widget.

r#"
Frame..             | Rendering..
(dim1, dim2, dim3)  | aggregate(dim4)"#

Requires feature primitive_impls or pointer_impls.

  • primitive_impls: implemented for Schema4<_, _, _, W> where W = {f64, .., u8}.
  • pointer_impls: implemented for Schema4<_, _, _, Dw> where W: Clone + Into<f64>, Dw: Deref<Target = W>.
Source

pub fn breakdown_4th(&self) -> View4Breakdown4th<'_, Schema4<T, U, V, f64>>

Take a breakdown view of this 4-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the breakdown of the final dimension (4th), and use all other dimensions in the frame of the widget.

r#"
Frame..             | Breakdown Rendering..              |
(dim1, dim2, dim3)  | breakdown(dim4, aggregate(dim4)).. |"#

Requires feature primitive_impls or pointer_impls.

  • primitive_impls: implemented for Schema4<_, _, _, W> where W = {f64, .., u8}.
  • pointer_impls: implemented for Schema4<_, _, _, Dw> where W: Clone + Into<f64>, Dw: Deref<Target = W>.
Source

pub fn view_4th_breakdown_3rd( &self, ) -> View4Breakdown3rdView4th<'_, Schema4<T, U, V, f64>>

Take a view+breakdown of this 4-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the final dimension (4th) under a breakdown of the next dimension (3rd), and use all other dimensions in the frame of the widget.

r#"
Frame..       | Breakdown Rendering..              |
(dim1, dim2)  | breakdown(dim3, aggregate(dim4)).. |"#

Requires feature primitive_impls or pointer_impls.

  • primitive_impls: implemented for Schema4<_, _, _, W> where W = {f64, .., u8}.
  • pointer_impls: implemented for Schema4<_, _, _, Dw> where W: Clone + Into<f64>, Dw: Deref<Target = W>.
Source§

impl<T> Dataset<Schema1<T>>

Source

pub fn count(&self) -> View1Full<'_, Schema1<T>>

Take a counting view of this N-dimensional dataset. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the occurrences of each dimensional vector, while using all dimensions in the frame of the widget.

r#"
Frame..  | Rendering..
(*,)     | aggregate(count())"#

Implemented for Schema1<_>, Schema2<_, _>, Schema3<_, _, _>.

Source§

impl<T, U> Dataset<Schema2<T, U>>

Source

pub fn count_breakdown_2nd(&self) -> View2Breakdown2ndCount<'_, Schema2<T, U>>

Take a view of this 2-dimensional dataset breaking down the 2nd column. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the breakdown of the final dimension (2nd), and use all other dimensions in the frame of the widget. Rather than displaying the value of the final dimension, the occurrences of each dimensional vector are counted.

r#"
Frame..   | Breakdown Rendering..                 |
(dim1, )  | breakdown(dim2, aggregate(count())).. |"#

Implemented for Schema2<_, _>.

Source§

impl<T, U, V> Dataset<Schema3<T, U, V>>

Source

pub fn count_breakdown_3rd( &self, ) -> View3Breakdown3rdCount<'_, Schema3<T, U, V>>

Take a view of this 3-dimensional dataset breaking down the 3rd column. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the breakdown of the final dimension (3rd), and use all other dimensions in the frame of the widget.

r#"
Frame..       | Breakdown Rendering..                 |
(dim1, dim2)  | breakdown(dim3, aggregate(count())).. |"#

Implemented for Schema3<_, _, _>.

Source§

impl<T, U, V, W> Dataset<Schema4<T, U, V, W>>

Source

pub fn count_breakdown_4th( &self, ) -> View4Breakdown4thCount<'_, Schema4<T, U, V, W>>

Take a view of this 4-dimensional dataset breaking down the 4th column. Views are rendered differently by different widgets, but always have a frame on the left and a rendering on the right.

This view will render the breakdown of the final dimension (4th), and use all other dimensions in the frame of the widget.

r#"
Frame..             | Breakdown Rendering..                 |
(dim1, dim2, dim3)  | breakdown(dim4, aggregate(count())).. |"#

Implemented for Schema4<_, _, _, _>.

Auto Trait Implementations§

§

impl<S> Freeze for Dataset<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Dataset<S>
where S: RefUnwindSafe, <S as Schema>::Dimensions: RefUnwindSafe,

§

impl<S> Send for Dataset<S>
where S: Send, <S as Schema>::Dimensions: Send,

§

impl<S> Sync for Dataset<S>
where S: Sync, <S as Schema>::Dimensions: Sync,

§

impl<S> Unpin for Dataset<S>
where S: Unpin, <S as Schema>::Dimensions: Unpin,

§

impl<S> UnwindSafe for Dataset<S>
where S: UnwindSafe, <S as Schema>::Dimensions: UnwindSafe,

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.