pub struct ThumbnailQuery {
pub id: String,
pub pid: Option<String>,
pub width: Option<u32>,
pub height: Option<u32>,
pub padding: Option<u32>,
pub crop: Option<CropMode>,
}Expand description
Query parameters for the Bing thumbnail endpoint.
Fields§
§id: StringImage identifier.
pid: Option<String>Page identifier.
width: Option<u32>Width in pixels.
If only width is specified, Bing maintains the aspect ratio.
height: Option<u32>Height in pixels.
If only height is specified, Bing maintains the aspect ratio.
padding: Option<u32>Prevent white padding when the requested size exceeds the original.
Set to 0 to prevent padding.
crop: Option<CropMode>Crop mode.
Implementations§
Trait Implementations§
Source§impl Clone for ThumbnailQuery
impl Clone for ThumbnailQuery
Source§fn clone(&self) -> ThumbnailQuery
fn clone(&self) -> ThumbnailQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ThumbnailQuery
impl Debug for ThumbnailQuery
Source§impl<'de> Deserialize<'de> for ThumbnailQuery
impl<'de> Deserialize<'de> for ThumbnailQuery
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 Serialize for ThumbnailQuery
impl Serialize for ThumbnailQuery
Source§impl ThumbnailParams for ThumbnailQuery
impl ThumbnailParams for ThumbnailQuery
fn query(&self) -> &ThumbnailQuery
fn query_mut(&mut self) -> &mut ThumbnailQuery
fn pid(self, pid: impl Into<String>) -> Self
fn pid_option(self, pid: Option<impl Into<String>>) -> Self
fn width(self, width: u32) -> Self
fn width_option(self, width: Option<u32>) -> Self
fn height(self, height: u32) -> Self
fn height_option(self, height: Option<u32>) -> Self
Source§fn no_padding(self) -> Self
fn no_padding(self) -> Self
Prevent white padding when the requested size exceeds the original.
fn padding_option(self, padding: Option<u32>) -> Self
fn crop(self, mode: CropMode) -> Self
fn crop_option(self, mode: Option<CropMode>) -> Self
Auto Trait Implementations§
impl Freeze for ThumbnailQuery
impl RefUnwindSafe for ThumbnailQuery
impl Send for ThumbnailQuery
impl Sync for ThumbnailQuery
impl Unpin for ThumbnailQuery
impl UnsafeUnpin for ThumbnailQuery
impl UnwindSafe for ThumbnailQuery
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