[−][src]Struct mediaproxy_common::query::Query
The default object that clients use to make requests to Media Proxy.
Fields
source: String
URL of the source image. Input formats currently supported are the same as those of the [image] crate.
width: Option<u32>
The width of the processed image.
height: Option<u32>
The height of the processed image.
format: OutputFormat
Output format of the image.
fit_mode: Option<ResizeStrategy>
Strategy for resizing image.
Implementations
impl Query
[src]
pub fn to_fingerprint(&self) -> String
[src]
Convert a Query
to a fingerprint.
In reality, this just serializes the Query
to JSON and encodes it in base64.
pub fn from_fingerprint(fingerprint: String) -> Result<Query, FingerprintError>
[src]
Create a Query
from a base64 encoded fingerprint. Fingerprints can be created with Query.to_fingerprint()
.
Arguments
fingerprint
- A base64 encodedQuery
in JSON.
Example
use mediaproxy_common::query::Query; let query = Query::from_fingerprint("eyJzb3VyY2UiOiJodHRwczovL2R1bW15aW1hZ2UuY29tLzYwMHg0MDAvMDAwL2ZmZiIsIndpZHRoIjpudWxsLCJoZWlnaHQiOm51bGwsImZvcm1hdCI6ImpwZWcifQ".to_string());
Trait Implementations
impl<'de> Deserialize<'de> for Query
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Query
[src]
Auto Trait Implementations
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnwindSafe for Query
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,