Skip to main content

ExportRow

Struct ExportRow 

Source
pub struct ExportRow<'a, R: GridRow> { /* private fields */ }
Expand description

A row of an ExportTable: a row of the application, or a summary row of a grouped view (ExportLine).

RowCell of a columnValue
newEvery columnThe row’s value
captionvalue_columnThe group’s key value, also where the column has an aggregate
An aggregated columnThe group’s aggregate
footerAn aggregated columnThe group’s aggregate
totalsAn aggregated columnThe view’s aggregate
The label’s column without an aggregateThe label

A summary row has no cell in any other column: an empty field. An empty aggregate is a cell with CellValue::Empty.

Marks tell where the row is on screen, for a spreadsheet’s outline and frozen panes: its pinned band (band), whether a collapsed group or tree row hides it (is_hidden), and its children in a tree (branch). A data row may carry the optimistic values of edits still waiting for their answer (with_pending): its cells show them, as the screen does.

Implementations§

Source§

impl<'a, R: GridRow> ExportRow<'a, R>

Source

pub fn new(row: &'a R) -> Self

A row of the application that exports every column of the table, at depth 0.

Source

pub fn caption(value_column: R::Column, group: GroupInfo<'a>) -> Self

The caption of group: its key value in value_column, its aggregates in their columns, at the group’s depth. The grid passes the group’s own column when it is exported, else the first exported column.

Source

pub fn footer(group: GroupInfo<'a>) -> Self

The footer of group: its aggregates in their columns, at the group’s depth.

Source

pub fn totals( aggregates: AggregateRow<'a>, label: Option<(R::Column, &'a str)>, ) -> Self

The totals row: the aggregates of the whole view in their columns, and label in its column when that column has no aggregate; at depth 0.

Source

pub fn with_number_formats(self, formats: &'a [NumberFormat]) -> Self

Sets how each column shows its numbers, by ColumnIx (GridColumn::with_number_format): a column past the end shows the default. The grid sets its columns’ formats on every row it exports, so a cell is written as the screen shows it.

Source

pub fn with_depth(self, depth: u16) -> Self

Sets the row’s level under group captions or tree parents: a data row of a group is one level below the group’s caption.

Source

pub fn with_columns(self, columns: ColumnSet) -> Self

Exports only columns of this row; its other cells in the table are empty fields. A cell selection copies its bounding rectangle this way.

Source

pub fn with_band(self, edge: PinnedEdge) -> Self

Marks a row of a pinned band, or the totals row in it, with the band’s edge. The top band comes before the other lines and is frozen with the header on screen.

Source

pub fn with_hidden(self, hidden: bool) -> Self

Marks the row hidden on screen: under a collapsed group caption or tree row. Only an ExportScope::Expanded export writes such rows; a spreadsheet may write them hidden under a collapsed outline level.

Source

pub fn with_branch(self, branch: Branch) -> Self

Marks a tree row with shown children: their count and whether it is expanded on screen. A summary row is no tree row: ignored there.

Source

pub fn with_pending(self, pending: &'a [(R::Column, OwnedValue)]) -> Self

Sets the optimistic values of edits to this row that still wait for their answer, by column: they replace the row’s values of their columns, as on screen (ExportCell::is_pending). A summary row has none: ignored there.

Source

pub fn line(&self) -> ExportLine

What the row is.

Source

pub fn row(&self) -> Option<&'a R>

The application row; None for a caption, a footer or the totals.

Source

pub fn band(&self) -> Option<PinnedEdge>

The edge of the pinned band the row is in; None outside the bands.

Source

pub fn is_hidden(&self) -> bool

Returns true if the row is hidden on screen, under a collapsed group caption or tree row.

Source

pub fn branch(&self) -> Option<Branch>

The shown children of a tree row; None for a leaf, outside a tree and for a summary row.

Source

pub fn group(&self) -> Option<GroupInfo<'a>>

The group of a caption or a footer: its path, row count and aggregates.

Source

pub fn depth(&self) -> u16

The row’s level under group captions or tree parents; 0 at the top.

Source

pub fn columns(&self) -> ColumnSet

The columns this row exports.

Source

pub fn cell(&self, column: R::Column) -> Option<ExportCell<'a, R>>

The cell of column, or None if this row does not export it or, in a summary row, has nothing in it.

Trait Implementations§

Source§

impl<R: GridRow> Clone for ExportRow<'_, R>

Source§

fn clone(&self) -> Self

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<R: GridRow> Copy for ExportRow<'_, R>

Auto Trait Implementations§

§

impl<'a, R> Freeze for ExportRow<'a, R>
where <R as GridRow>::Column: Freeze,

§

impl<'a, R> !RefUnwindSafe for ExportRow<'a, R>

§

impl<'a, R> Send for ExportRow<'a, R>

§

impl<'a, R> Sync for ExportRow<'a, R>

§

impl<'a, R> Unpin for ExportRow<'a, R>
where <R as GridRow>::Column: Unpin,

§

impl<'a, R> UnsafeUnpin for ExportRow<'a, R>
where <R as GridRow>::Column: UnsafeUnpin,

§

impl<'a, R> !UnwindSafe for ExportRow<'a, R>

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
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

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

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

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

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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.

§

impl<T> Instrument for T

§

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

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

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,