pub struct RawImage {
pub data: Vec<u8>,
pub bbox: Option<Rect>,
pub ext: String,
pub px: Option<(u32, u32)>,
pub ocr_text: Option<String>,
}Expand description
解析产出的原始图片(可携带 OCR 结果)。
Fields§
§data: Vec<u8>§bbox: Option<Rect>§ext: String§px: Option<(u32, u32)>内嵌位图像素尺寸(宽, 高);装饰图过滤 < 50px 用(对齐 Python px_size)
ocr_text: Option<String>嵌入图 OCR 文本(未识别为 None;与 Python meta["ocr_text"] 对齐)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RawImage
impl RefUnwindSafe for RawImage
impl Send for RawImage
impl Sync for RawImage
impl Unpin for RawImage
impl UnsafeUnpin for RawImage
impl UnwindSafe for RawImage
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,
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