#[non_exhaustive]pub struct Request {
pub server_name: OwnedServerName,
pub media_id: String,
pub allow_remote: bool,
pub timeout_ms: Duration,
pub allow_redirect: bool,
}Since Matrix 1.11, clients should use authenticated_media::get_content::v1::Request instead if the homeserver supports it.
api and (crate features client-api-c or client-api-s) and (crate features client or server) only.Expand description
Request type for the get_media_content 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.server_name: OwnedServerNameSince Matrix 1.11, clients should use authenticated_media::get_content::v1::Request instead if the homeserver supports it.
The server name from the mxc:// URI (the authoritory component).
media_id: StringSince Matrix 1.11, clients should use authenticated_media::get_content::v1::Request instead if the homeserver supports it.
The media ID from the mxc:// URI (the path component).
allow_remote: boolSince Matrix 1.11, clients should use authenticated_media::get_content::v1::Request instead if the homeserver supports it.
Whether to fetch media deemed remote.
Used to prevent routing loops. Defaults to true.
timeout_ms: DurationSince Matrix 1.11, clients should use authenticated_media::get_content::v1::Request instead if the homeserver supports it.
The 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.
allow_redirect: boolSince Matrix 1.11, clients should use authenticated_media::get_content::v1::Request instead if the homeserver supports it.
Whether the server may return a 307 or 308 redirect response that points at the relevant media content.
Unless explicitly set to true, the server must return the media content itself.
Implementationsยง
Trait Implementationsยง
Sourceยงimpl IncomingRequest for Request
Available on crate feature server only.
impl IncomingRequest for Request
server only.Sourceยงtype EndpointError = Error
type EndpointError = Error
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 = false
const RATE_LIMITED: bool = false
Sourceยงconst PATH_BUILDER: VersionHistory
const PATH_BUILDER: VersionHistory
Sourceยงtype Authentication = NoAccessToken
type Authentication = NoAccessToken
Sourceยงtype PathBuilder = VersionHistory
type PathBuilder = VersionHistory
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
Available on crate feature client only.
impl OutgoingRequest for Request
client only.Sourceยงtype EndpointError = Error
type EndpointError = Error
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 moreAuto Trait Implementationsยง
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin 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,
Sourceยงimpl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
ยงimpl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
ยงfn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
ยงunsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
ยงunsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read moreSourceยง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,
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> OutgoingRequestAppserviceExt for Twhere
T: OutgoingRequest,
<T as Metadata>::Authentication: for<'a> AuthScheme<Input<'a> = SendAccessToken<'a>>,
impl<T> OutgoingRequestAppserviceExt for Twhere
T: OutgoingRequest,
<T as Metadata>::Authentication: for<'a> AuthScheme<Input<'a> = SendAccessToken<'a>>,
Sourceยงfn try_into_http_request_with_identity<T>(
self,
base_url: &str,
access_token: SendAccessToken<'_>,
identity: AppserviceUserIdentity<'_>,
path_builder_input: <Self::PathBuilder as PathBuilder>::Input<'_>,
) -> Result<Request<T>, IntoHttpError>
fn try_into_http_request_with_identity<T>( self, base_url: &str, access_token: SendAccessToken<'_>, identity: AppserviceUserIdentity<'_>, path_builder_input: <Self::PathBuilder as PathBuilder>::Input<'_>, ) -> Result<Request<T>, IntoHttpError>
http::Request and adds the given
AppserviceUserIdentity to it, if the identity is not empty.