pub struct DocxProcessor { /* private fields */ }Expand description
DOCX 文档处理器
Implementations§
Source§impl DocxProcessor
impl DocxProcessor
Sourcepub fn load_from_bytes(&mut self, bytes: &[u8]) -> Result<()>
pub fn load_from_bytes(&mut self, bytes: &[u8]) -> Result<()>
从字节数组加载 DOCX 文件
Sourcepub fn get_content(&self) -> &str
pub fn get_content(&self) -> &str
获取文档内容
Sourcepub fn extract_text_content(&self) -> Result<String>
pub fn extract_text_content(&self) -> Result<String>
提取纯文本内容(用于模板变量提取)
Sourcepub fn process_template_in_xml(&self, _template_content: &str) -> Result<String>
pub fn process_template_in_xml(&self, _template_content: &str) -> Result<String>
处理 XML 内容中的 Handlebars 模板
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DocxProcessor
impl RefUnwindSafe for DocxProcessor
impl Send for DocxProcessor
impl Sync for DocxProcessor
impl Unpin for DocxProcessor
impl UnwindSafe for DocxProcessor
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