pub struct JsonAdapter { /* private fields */ }Implementations§
Source§impl JsonAdapter
impl JsonAdapter
pub fn new() -> Self
pub fn to_json_string(&self) -> Result<String, IoError>
pub fn set_dimensions(&mut self, sheet: &str, dims: Option<(u32, u32)>)
pub fn set_date_system_1904(&mut self, sheet: &str, value: bool)
pub fn set_merged_cells(&mut self, sheet: &str, merged: Vec<MergedRange>)
pub fn set_tables(&mut self, sheet: &str, tables: Vec<TableDefinition>)
pub fn set_named_ranges(&mut self, sheet: &str, named: Vec<NamedRange>)
Trait Implementations§
Source§impl Default for JsonAdapter
impl Default for JsonAdapter
Source§impl<R> EngineLoadStream<R> for JsonAdapterwhere
R: EvaluationContext,
impl<R> EngineLoadStream<R> for JsonAdapterwhere
R: EvaluationContext,
Source§impl SpreadsheetReader for JsonAdapter
impl SpreadsheetReader for JsonAdapter
type Error = IoError
fn access_granularity(&self) -> AccessGranularity
fn capabilities(&self) -> BackendCaps
fn sheet_names(&self) -> Result<Vec<String>, Self::Error>
Source§fn open_path<P: AsRef<Path>>(path: P) -> Result<Self, Self::Error>where
Self: Sized,
fn open_path<P: AsRef<Path>>(path: P) -> Result<Self, Self::Error>where
Self: Sized,
Constructor variants for different environments
fn open_reader(reader: Box<dyn Read + Send + Sync>) -> Result<Self, Self::Error>where
Self: Sized,
fn open_bytes(bytes: Vec<u8>) -> Result<Self, Self::Error>where
Self: Sized,
fn read_range( &mut self, sheet: &str, start: (u32, u32), end: (u32, u32), ) -> Result<BTreeMap<(u32, u32), CellData>, Self::Error>
fn read_sheet(&mut self, sheet: &str) -> Result<SheetData, Self::Error>
fn sheet_bounds(&self, sheet: &str) -> Option<(u32, u32)>
fn is_loaded(&self, _sheet: &str, _row: Option<u32>, _col: Option<u32>) -> bool
fn read_cell( &mut self, sheet: &str, row: u32, col: u32, ) -> Result<Option<CellData>, Self::Error>
Source§impl SpreadsheetWriter for JsonAdapter
impl SpreadsheetWriter for JsonAdapter
type Error = IoError
fn write_cell( &mut self, sheet: &str, row: u32, col: u32, data: CellData, ) -> Result<(), Self::Error>
fn write_range( &mut self, sheet: &str, cells: BTreeMap<(u32, u32), CellData>, ) -> Result<(), Self::Error>
fn clear_range( &mut self, sheet: &str, start: (u32, u32), end: (u32, u32), ) -> Result<(), Self::Error>
fn create_sheet(&mut self, name: &str) -> Result<(), Self::Error>
fn delete_sheet(&mut self, name: &str) -> Result<(), Self::Error>
fn rename_sheet(&mut self, old: &str, new: &str) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
fn save(&mut self) -> Result<(), Self::Error>
Source§fn save_to<'a>(
&mut self,
dest: SaveDestination<'a>,
) -> Result<Option<Vec<u8>>, Self::Error>
fn save_to<'a>( &mut self, dest: SaveDestination<'a>, ) -> Result<Option<Vec<u8>>, Self::Error>
Advanced save: specify destination (in place, path, writer, or bytes in memory).
Returns Ok(Some(bytes)) only for Bytes destination, else Ok(None).
fn save_as_path<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Self::Error>
fn save_to_bytes(&mut self) -> Result<Vec<u8>, Self::Error>
fn write_to<W: Write>(&mut self, writer: &mut W) -> Result<(), Self::Error>
Auto Trait Implementations§
impl Freeze for JsonAdapter
impl RefUnwindSafe for JsonAdapter
impl Send for JsonAdapter
impl Sync for JsonAdapter
impl Unpin for JsonAdapter
impl UnwindSafe for JsonAdapter
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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> 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