client-api: Allow custom values for get_content_thumbnail::Method
This commit is contained in:
parent
48348edc7e
commit
132a7b86ec
@ -3,17 +3,20 @@
|
|||||||
use js_int::UInt;
|
use js_int::UInt;
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
use ruma_identifiers::ServerName;
|
use ruma_identifiers::ServerName;
|
||||||
use serde::{Deserialize, Serialize};
|
use ruma_serde::StringEnum;
|
||||||
|
|
||||||
/// The desired resizing method.
|
/// The desired resizing method.
|
||||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Debug, StringEnum)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[ruma_enum(rename_all = "snake_case")]
|
||||||
pub enum Method {
|
pub enum Method {
|
||||||
/// Crop the original to produce the requested image dimensions.
|
/// Crop the original to produce the requested image dimensions.
|
||||||
Crop,
|
Crop,
|
||||||
|
|
||||||
/// Maintain the original aspect ratio of the source image.
|
/// Maintain the original aspect ratio of the source image.
|
||||||
Scale,
|
Scale,
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
|
_Custom(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
ruma_api! {
|
ruma_api! {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user