pub struct MatrixList {
pub type_name: String,
pub schema: Vec<String>,
pub rows: Vec<Node>,
pub count_hint: Option<usize>,
}Expand description
A typed matrix list with schema.
Fields§
§type_name: StringThe type name.
schema: Vec<String>Column names (schema).
rows: Vec<Node>Row data as nodes.
count_hint: Option<usize>Optional count hint for LLM comprehension (e.g., teams(3):@Team).
Implementations§
Source§impl MatrixList
impl MatrixList
Sourcepub fn new(type_name: impl Into<String>, schema: Vec<String>) -> Self
pub fn new(type_name: impl Into<String>, schema: Vec<String>) -> Self
Create a new matrix list.
Sourcepub fn with_rows(
type_name: impl Into<String>,
schema: Vec<String>,
rows: Vec<Node>,
) -> Self
pub fn with_rows( type_name: impl Into<String>, schema: Vec<String>, rows: Vec<Node>, ) -> Self
Create a new matrix list with rows.
Sourcepub fn with_count_hint(
type_name: impl Into<String>,
schema: Vec<String>,
count_hint: usize,
) -> Self
pub fn with_count_hint( type_name: impl Into<String>, schema: Vec<String>, count_hint: usize, ) -> Self
Create a new matrix list with a count hint.
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Get the number of columns.
Trait Implementations§
Source§impl Clone for MatrixList
impl Clone for MatrixList
Source§fn clone(&self) -> MatrixList
fn clone(&self) -> MatrixList
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MatrixList
impl Debug for MatrixList
Source§impl PartialEq for MatrixList
impl PartialEq for MatrixList
impl StructuralPartialEq for MatrixList
Auto Trait Implementations§
impl Freeze for MatrixList
impl RefUnwindSafe for MatrixList
impl Send for MatrixList
impl Sync for MatrixList
impl Unpin for MatrixList
impl UnwindSafe for MatrixList
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§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 more