Struct somedoc::model::block::Table [−][src]
A typical, simple, table of rows and columns.
Implementations
impl Table
[src]
pub fn new(columns: &[Column]) -> Self
[src]
Construct a new Table
from an array of Column
values. These column values describe the
shape of the table to be constructed.
pub fn has_columns(&self) -> bool
[src]
Return true if this table has columns (although it's not really a table without them), else
false
.
pub fn columns(&self) -> &Vec<Column>
[src]
Return the current array of columns in the table.
pub fn add_column(&mut self, column: Column)
[src]
Add a new column to the table, this is appended to the current array.
pub fn add_columns(&mut self, columns: &[Column])
[src]
Add an array of columns to the table, these are appended to the current array.
pub fn has_rows(&self) -> bool
[src]
Returns true
if this table has data rows, else false
.
pub fn rows(&self) -> &Vec<Row>
[src]
Returns an array of data rows.
pub fn add_row(&mut self, row: Row)
[src]
Add a new data row to the column, this is appended to the current array.
pub fn add_rows(&mut self, rows: &[Row])
[src]
Add an array of new data rows to the column, these are appended to the current array.
Trait Implementations
impl Clone for Table
[src]
impl Debug for Table
[src]
impl Default for Table
[src]
impl<'de> Deserialize<'de> for Table
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl HasCaption for Table
[src]
fn caption(&self) -> &Option<Caption>
[src]
fn set_caption(&mut self, caption: Caption) -> &mut Self
[src]
fn unset_caption(&mut self) -> &mut Self
[src]
fn has_caption(&self) -> bool
[src]
impl HasLabel for Table
[src]
fn has_label(&self) -> bool
[src]
fn label(&self) -> &Option<Label>
[src]
fn set_label(&mut self, label: Label) -> &mut Self
[src]
fn unset_label(&mut self) -> &mut Self
[src]
impl Into<BlockContent> for Table
[src]
fn into(self) -> BlockContent
[src]
impl Serialize for Table
[src]
Auto Trait Implementations
impl RefUnwindSafe for Table
[src]
impl Send for Table
[src]
impl Sync for Table
[src]
impl Unpin for Table
[src]
impl UnwindSafe for Table
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,