pub struct DocxImage {
pub image_path: String,
pub image_ext: String,
pub image_data: Vec<u8>,
pub relation_id: String,
pub width: u64,
pub height: u64,
}Fields§
§image_path: String§image_ext: String§image_data: Vec<u8>§relation_id: String§width: u64§height: u64Implementations§
Source§impl DocxImage
impl DocxImage
Sourcepub fn new_size(
image_path: &str,
width: u64,
height: u64,
) -> Result<Self, DocxError>
pub fn new_size( image_path: &str, width: u64, height: u64, ) -> Result<Self, DocxError>
设置图片大小
@param image_path 图片路径
@param width 图片宽度(emu)
@param height 图片高度 (emu)
Auto Trait Implementations§
impl Freeze for DocxImage
impl RefUnwindSafe for DocxImage
impl Send for DocxImage
impl Sync for DocxImage
impl Unpin for DocxImage
impl UnwindSafe for DocxImage
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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