Skip to main content

JsonAdapter

Struct JsonAdapter 

Source
pub struct JsonAdapter { /* private fields */ }

Implementations§

Source§

impl JsonAdapter

Source

pub fn new() -> Self

Source

pub fn new_with_options(read_options: JsonReadOptions) -> Self

Source

pub fn read_options(&self) -> &JsonReadOptions

Source

pub fn set_read_options(&mut self, opts: JsonReadOptions)

Source

pub fn to_json_string(&self) -> Result<String, IoError>

Source

pub fn set_dimensions(&mut self, sheet: &str, dims: Option<(u32, u32)>)

Source

pub fn set_date_system_1904(&mut self, sheet: &str, value: bool)

Source

pub fn set_merged_cells(&mut self, sheet: &str, merged: Vec<MergedRange>)

Source

pub fn set_tables(&mut self, sheet: &str, tables: Vec<TableDefinition>)

Source

pub fn set_named_ranges(&mut self, sheet: &str, named: Vec<NamedRange>)

Source

pub fn set_defined_names(&mut self, names: Vec<DefinedName>)

Trait Implementations§

Source§

impl Default for JsonAdapter

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<R> EngineLoadStream<R> for JsonAdapter

Source§

type Error = IoError

Source§

fn stream_into_engine( &mut self, engine: &mut Engine<R>, ) -> Result<(), Self::Error>

Source§

impl SpreadsheetReader for JsonAdapter

Source§

type Error = IoError

Source§

fn access_granularity(&self) -> AccessGranularity

Source§

fn capabilities(&self) -> BackendCaps

Source§

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,

Constructor variants for different environments
Source§

fn open_reader(reader: Box<dyn Read + Send + Sync>) -> Result<Self, Self::Error>
where Self: Sized,

Source§

fn open_bytes(bytes: Vec<u8>) -> Result<Self, Self::Error>
where Self: Sized,

Source§

fn defined_names(&mut self) -> Result<Vec<DefinedName>, Self::Error>

Workbook-level defined names (workbook scoped or sheet scoped). Read more
Source§

fn read_range( &mut self, sheet: &str, start: (u32, u32), end: (u32, u32), ) -> Result<BTreeMap<(u32, u32), CellData>, Self::Error>

Source§

fn read_sheet(&mut self, sheet: &str) -> Result<SheetData, Self::Error>

Source§

fn sheet_bounds(&self, sheet: &str) -> Option<(u32, u32)>

Source§

fn is_loaded(&self, _sheet: &str, _row: Option<u32>, _col: Option<u32>) -> bool

Source§

fn read_cell( &mut self, sheet: &str, row: u32, col: u32, ) -> Result<Option<CellData>, Self::Error>

Source§

impl SpreadsheetWriter for JsonAdapter

Source§

type Error = IoError

Source§

fn write_cell( &mut self, sheet: &str, row: u32, col: u32, data: CellData, ) -> Result<(), Self::Error>

Source§

fn write_range( &mut self, sheet: &str, cells: BTreeMap<(u32, u32), CellData>, ) -> Result<(), Self::Error>

Source§

fn clear_range( &mut self, sheet: &str, start: (u32, u32), end: (u32, u32), ) -> Result<(), Self::Error>

Source§

fn create_sheet(&mut self, name: &str) -> Result<(), Self::Error>

Source§

fn delete_sheet(&mut self, name: &str) -> Result<(), Self::Error>

Source§

fn rename_sheet(&mut self, old: &str, new: &str) -> Result<(), Self::Error>

Source§

fn flush(&mut self) -> Result<(), Self::Error>

Source§

fn save(&mut self) -> Result<(), Self::Error>

Source§

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).
Source§

fn save_as_path<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Self::Error>

Source§

fn save_to_bytes(&mut self) -> Result<Vec<u8>, Self::Error>

Source§

fn write_to<W: Write>(&mut self, writer: &mut W) -> Result<(), Self::Error>

Auto Trait Implementations§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,