Struct structured::Table
source · [−]pub struct Table { /* private fields */ }
Expand description
Structured data represented in a column-oriented form.
Implementations
sourceimpl Table
impl Table
sourcepub fn new(
schema: Arc<Schema>,
columns: Vec<Column>,
event_ids: HashMap<u64, usize>
) -> Result<Self, &'static str>
pub fn new(
schema: Arc<Schema>,
columns: Vec<Column>,
event_ids: HashMap<u64, usize>
) -> Result<Self, &'static str>
Creates a new Table
with the given schema
and columns
.
Errors
Returns an error if columns
have different lengths.
sourcepub fn append(&mut self, other: &mut Self)
pub fn append(&mut self, other: &mut Self)
Moves all the rows of other
intot self
, leaving other
empty.
Panics
Panics if the types of columns are different, or the number of rows
overflows usize
.
sourcepub fn num_columns(&self) -> usize
pub fn num_columns(&self) -> usize
Returns the number of columns in the table.
sourcepub fn column_values(
&self,
events: &[u64],
column_types: &Arc<Vec<ColumnType>>,
target_columns: &[usize],
flag: &ContentFlag
) -> Vec<(usize, ColumnMessages)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn column_values(
&self,
events: &[u64],
column_types: &Arc<Vec<ColumnType>>,
target_columns: &[usize],
flag: &ContentFlag
) -> Vec<(usize, ColumnMessages)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns the column’s content of event_id
in row_events
for each target_columns
sourcepub fn column_raw_content(
&self,
events: &[u64],
column_types: &Arc<Vec<ColumnType>>,
target_columns: &[(usize, &str)]
) -> HashMap<u64, Vec<Option<String>>>
pub fn column_raw_content(
&self,
events: &[u64],
column_types: &Arc<Vec<ColumnType>>,
target_columns: &[(usize, &str)]
) -> HashMap<u64, Vec<Option<String>>>
Return columns content for the selected event
pub fn statistics(
&self,
rows: &[usize],
column_types: &Arc<Vec<ColumnType>>,
r_enum_maps: &HashMap<usize, HashMap<u64, Vec<String>>>,
time_intervals: &Arc<Vec<u32>>,
numbers_of_top_n: &Arc<Vec<u32>>
) -> Vec<ColumnStatistics>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn count_group_by(
&self,
rows: &[usize],
column_types: &Arc<Vec<ColumnType>>,
by_column: usize,
by_interval: Option<u32>,
count_columns: &Arc<Vec<usize>>
) -> Vec<GroupCount>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn event_index(&self, eventid: u64) -> Option<&usize>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl !UnwindSafe for Table
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more