OutgoingRequestAppserviceExt

Trait OutgoingRequestAppserviceExt 

Source
pub trait OutgoingRequestAppserviceExt: OutgoingRequest
where for<'a> Self::Authentication: AuthScheme<Input<'a> = SendAccessToken<'a>>,
{ // Provided method fn try_into_http_request_with_identity<T: Default + BufMut + AsRef<[u8]>>( self, base_url: &str, access_token: SendAccessToken<'_>, identity: AppserviceUserIdentity<'_>, path_builder_input: <Self::PathBuilder as PathBuilder>::Input<'_>, ) -> Result<Request<T>, IntoHttpError> { ... } }
Available on crate feature api only.
Expand description

An extension to OutgoingRequest which provides Appservice specific methods.

This is only implemented for implementors of AuthScheme that use a SendAccessToken, because application services should only use these methods with the Client-Server API.

Provided Methods§

Source

fn try_into_http_request_with_identity<T: Default + BufMut + AsRef<[u8]>>( self, base_url: &str, access_token: SendAccessToken<'_>, identity: AppserviceUserIdentity<'_>, path_builder_input: <Self::PathBuilder as PathBuilder>::Input<'_>, ) -> Result<Request<T>, IntoHttpError>

Tries to convert this request into an http::Request and adds the given AppserviceUserIdentity to it, if the identity is not empty.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§