Struct Request
#[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>,
}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§
§impl Metadata for Request
impl Metadata for Request
§const RATE_LIMITED: bool = true
const RATE_LIMITED: bool = true
§const PATH_BUILDER: <Request as Metadata>::PathBuilder
const PATH_BUILDER: <Request as Metadata>::PathBuilder
§type Authentication = <Request as Metadata>::Authentication
type Authentication = <Request as Metadata>::Authentication
§type PathBuilder = <Request as Metadata>::PathBuilder
type PathBuilder = <Request as Metadata>::PathBuilder
§fn empty_request_body<B>() -> B
fn empty_request_body<B>() -> B
§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>
§impl OutgoingRequest for Request
impl OutgoingRequest for Request
§type EndpointError = MatrixError
type EndpointError = MatrixError
§type IncomingResponse = Response
type IncomingResponse = Response
§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 moreAuto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more