pub struct Input {
pub image_url: String,
pub source_lang: String,
pub target_lang: String,
pub ext: Option<Ext>,
}Fields§
§image_url: String图像的公网可访问的URL,支持 HTTP 或 HTTPS 协议。
- 格式限制:JPG、JPEG、PNG、BMP、PNM、PPM、TIFF、WEBP
- 尺寸限制:图像的宽度和高度均需在15-8192像素范围内,宽高比在1:10至10:1范围内。
- 大小限制:不超过10MB
source_lang: String源语种。
- 支持值:语种全称、语种编码或auto(自动检测),对大小写不敏感
- 限制:与target_lang不同,且至少有一项为中文或英文
- 示例:Chinese、en或auto
target_lang: String目标语种。
- 支持值:语种全称或语种编码,对大小写不敏感
- 限制:与source_lang不同,且至少有一项为中文或英文
- 示例:Chinese、en
ext: Option<Ext>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Input
impl<'de> Deserialize<'de> for Input
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 Input
Auto Trait Implementations§
impl Freeze for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
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