[][src]Struct wasccgraph_common::ResultSet

pub struct ResultSet {
    pub columns: Vec<Column>,
    pub statistics: Statistics,
}

Represents the return data from a graph. You shouldn't have to use this type directly, but rather extract rows and columns via vectors of tuples and pattern matching/destructing

Fields

columns: Vec<Column>

The columns of this result set.

Empty if the response did not contain any return values.

statistics: Statistics

Contains statistics messages from the response.

Implementations

impl ResultSet[src]

pub fn num_columns(&self) -> usize[src]

Returns the number of rows in the result set.

pub fn num_rows(&self) -> usize[src]

Returns the number of columns in the result set.

pub fn get_scalar(
    &self,
    row_idx: usize,
    column_idx: usize
) -> GraphResult<&Scalar>
[src]

Returns the scalar at the given position.

Returns an error if the value at the given position is not a scalar or if the position is out of bounds.

pub fn get_node(&self, row_idx: usize, column_idx: usize) -> GraphResult<&Node>[src]

Returns the node at the given position.

Returns an error if the value at the given position is not a node or if the position is out of bounds.

pub fn get_relation(
    &self,
    row_idx: usize,
    column_idx: usize
) -> GraphResult<&Relation>
[src]

Returns the relation at the given position.

Returns an error if the value at the given position is not a relation or if the position is out of bounds.

Trait Implementations

impl Clone for ResultSet[src]

impl Debug for ResultSet[src]

impl<'de> Deserialize<'de> for ResultSet[src]

impl FromTable for ResultSet[src]

impl PartialEq<ResultSet> for ResultSet[src]

impl Serialize for ResultSet[src]

impl StructuralPartialEq for ResultSet[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> FromTable for T where
    T: FromRow
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.