pub enum Op {
CreateDocx {
blocks: Vec<Block>,
},
CreateXlsx {
sheets: Vec<SheetSpec>,
},
ReplaceText {
find: String,
replace: String,
},
AppendBlocks {
blocks: Vec<Block>,
},
SetCells {
sheet: String,
cells: Vec<CellSet>,
},
AppendRows {
sheet: String,
rows: Vec<Vec<CellInput>>,
},
AddPdfText {
page: u32,
x: f64,
y: f64,
text: String,
size_pt: Option<f64>,
},
SelectPdfPages {
pages: Vec<u32>,
},
}Expand description
One typed write op. A write call applies its ops in order to one in-memory document and
publishes the result once.
Variants§
CreateDocx
Create a DOCX from blocks. The target must not exist unless overwrite.
CreateXlsx
Create an XLSX. The target must not exist unless overwrite.
ReplaceText
DOCX (body, headers, footers; across run boundaries) or PDF (source text, per island).
AppendBlocks
DOCX: append blocks at the end of the body.
SetCells
XLSX: set cells on a sheet.
AppendRows
XLSX: append rows after the last populated row of a sheet.
AddPdfText
PDF: add a line of text at a point (PDF user space, origin bottom-left, points).
SelectPdfPages
PDF: keep only these 1-based pages, in this order.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Op
impl<'de> Deserialize<'de> for Op
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Op
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.