pub struct ImageParams {
pub w: Option<u32>,
pub h: Option<u32>,
pub thumb: Option<String>,
pub rotate: Option<u16>,
pub format: Option<String>,
pub quality: Option<u8>,
}Expand description
图片处理查询参数。
Fields§
§w: Option<u32>限制最大宽度。
h: Option<u32>限制最大高度。
thumb: Option<String>缩略图尺寸,格式 WxH。
rotate: Option<u16>旋转角度,仅允许 0/90/180/270。
format: Option<String>输出格式:jpeg/jpg、png、webp。
quality: Option<u8>输出质量,范围 1-100。
Implementations§
Trait Implementations§
Source§impl Clone for ImageParams
impl Clone for ImageParams
Source§fn clone(&self) -> ImageParams
fn clone(&self) -> ImageParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageParams
impl Debug for ImageParams
Source§impl Default for ImageParams
impl Default for ImageParams
Source§fn default() -> ImageParams
fn default() -> ImageParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ImageParams
impl<'de> Deserialize<'de> for ImageParams
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
Source§impl Hash for ImageParams
impl Hash for ImageParams
Source§impl PartialEq for ImageParams
impl PartialEq for ImageParams
impl Eq for ImageParams
impl StructuralPartialEq for ImageParams
Auto Trait Implementations§
impl Freeze for ImageParams
impl RefUnwindSafe for ImageParams
impl Send for ImageParams
impl Sync for ImageParams
impl Unpin for ImageParams
impl UnsafeUnpin for ImageParams
impl UnwindSafe for ImageParams
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.