#[non_exhaustive]pub struct Request {
    pub media_id: String,
    pub method: Option<Method>,
    pub width: UInt,
    pub height: UInt,
    pub timeout_ms: Duration,
    pub animated: Option<bool>,
}api and (crate features federation-api-c or federation-api-s) only.Expand description
Request type for the get_content_thumbnail endpoint.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.media_id: StringThe media ID from the mxc:// URI (the path component).
method: Option<Method>The desired resizing method.
width: UIntThe desired width of the thumbnail.
The actual thumbnail may not match the size specified.
height: UIntThe desired height of the thumbnail.
The actual thumbnail may not match the size specified.
timeout_ms: DurationThe maximum duration that the client is willing to wait to start receiving data, in the case that the content has not yet been uploaded.
The default value is 20 seconds.
animated: Option<bool>Whether the server should return an animated thumbnail.
When Some(true), the server should return an animated thumbnail if possible and
supported. When Some(false), the server must not return an animated
thumbnail. When None, the server should not return an animated thumbnail.
Implementations§
Trait Implementations§
Source§impl IncomingRequest for Request
 
impl IncomingRequest for Request
Source§type EndpointError = MatrixError
 
type EndpointError = MatrixError
Source§type OutgoingResponse = Response
 
type OutgoingResponse = Response
Source§fn try_from_http_request<B, S>(
    request: Request<B>,
    path_args: &[S],
) -> Result<Request, FromHttpRequestError>
 
fn try_from_http_request<B, S>( request: Request<B>, path_args: &[S], ) -> Result<Request, FromHttpRequestError>
http::Request into this request type,
together with the corresponding path arguments. Read moreSource§fn check_request_method(method: &Method) -> Result<(), FromHttpRequestError>
 
fn check_request_method(method: &Method) -> Result<(), FromHttpRequestError>
METHOD of this endpoint.Source§impl Metadata for Request
 
impl Metadata for Request
Source§const METHOD: Method = ::ruma_common::exports::http::Method::GET
 
const METHOD: Method = ::ruma_common::exports::http::Method::GET
Source§const RATE_LIMITED: bool = true
 
const RATE_LIMITED: bool = true
Source§const PATH_BUILDER: SinglePath
 
const PATH_BUILDER: SinglePath
Source§type Authentication = ServerSignatures
 
type Authentication = ServerSignatures
Source§type PathBuilder = SinglePath
 
type PathBuilder = SinglePath
Source§fn empty_request_body<B>() -> B
 
fn empty_request_body<B>() -> B
Source§fn make_endpoint_url(
    path_builder_input: <Self::PathBuilder as PathBuilder>::Input<'_>,
    base_url: &str,
    path_args: &[&dyn Display],
    query_string: &str,
) -> Result<String, IntoHttpError>
 
fn make_endpoint_url( path_builder_input: <Self::PathBuilder as PathBuilder>::Input<'_>, base_url: &str, path_args: &[&dyn Display], query_string: &str, ) -> Result<String, IntoHttpError>
Source§impl OutgoingRequest for Request
 
impl OutgoingRequest for Request
Source§type EndpointError = MatrixError
 
type EndpointError = MatrixError
Source§type IncomingResponse = Response
 
type IncomingResponse = Response
Source§fn try_into_http_request<T>(
    self,
    base_url: &str,
    authentication_input: <<Request as Metadata>::Authentication as AuthScheme>::Input<'_>,
    path_builder_input: <<Request as Metadata>::PathBuilder as PathBuilder>::Input<'_>,
) -> Result<Request<T>, IntoHttpError>
 
fn try_into_http_request<T>( self, base_url: &str, authentication_input: <<Request as Metadata>::Authentication as AuthScheme>::Input<'_>, path_builder_input: <<Request as Metadata>::PathBuilder as PathBuilder>::Input<'_>, ) -> Result<Request<T>, IntoHttpError>
http::Request. Read more