use crate::models::EnumStr;
use std::fmt;
#[derive(Debug)]
pub enum RowIncludeFlags {
Attachments,
Columns,
ColumnType,
Discussions,
Filters,
Format,
ObjectValue,
RowPermalink,
#[deprecated(note = "Use `RowIncludeFlags::WriterInfo` instead")]
RowWriterInfo,
WriterInfo,
}
impl EnumStr for RowIncludeFlags {
#[allow(deprecated)]
fn as_str<'a>(&self) -> &'a str {
match self {
Self::Attachments => "attachments",
Self::Columns => "columns",
Self::ColumnType => "columnType",
Self::Discussions => "discussions",
Self::Filters => "filters",
Self::Format => "format",
Self::ObjectValue => "objectValue",
Self::RowPermalink => "rowPermalink",
Self::RowWriterInfo => "rowWriterInfo",
Self::WriterInfo => "writerInfo",
}
}
}
impl fmt::Display for RowIncludeFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str(self.as_str())
}
}
#[derive(Debug)]
pub enum RowExcludeFlags {
LinkInFromCellDetails,
LinkOutToCellDetails,
NonExistentCells,
}
impl EnumStr for RowExcludeFlags {
fn as_str<'a>(&self) -> &'a str {
match self {
Self::LinkInFromCellDetails => "linkInFromCellDetails",
Self::LinkOutToCellDetails => "linksOutToCellsDetails",
Self::NonExistentCells => "nonexistentCells",
}
}
}
impl fmt::Display for RowExcludeFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str(self.as_str())
}
}