Struct ruma_server_util::authorization::XMatrix
source · #[non_exhaustive]pub struct XMatrix {
pub origin: OwnedServerName,
pub destination: Option<OwnedServerName>,
pub key: OwnedServerSigningKeyId,
pub sig: Base64,
}
Expand description
Typed representation of an Authorization
header of scheme X-Matrix
, as defined in the
Matrix Server-Server API.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.origin: OwnedServerName
The server name of the sending server.
destination: Option<OwnedServerName>
The server name of the receiving sender.
For compatibility with older servers, recipients should accept requests without this parameter, but MUST always send it. If this property is included, but the value does not match the receiving server’s name, the receiving server must deny the request with an HTTP status code 401 Unauthorized.
key: OwnedServerSigningKeyId
The ID - including the algorithm name - of the sending server’s key that was used to sign the request.
sig: Base64
The signature of the JSON.
Implementations§
Trait Implementations§
source§impl Credentials for XMatrix
impl Credentials for XMatrix
source§const SCHEME: &'static str = "X-Matrix"
const SCHEME: &'static str = "X-Matrix"
The scheme identify the format of these credentials. Read more
source§fn decode(value: &HeaderValue) -> Option<Self>
fn decode(value: &HeaderValue) -> Option<Self>
Try to decode the credentials from the
HeaderValue
. Read moresource§fn encode(&self) -> HeaderValue
fn encode(&self) -> HeaderValue
Encode the credentials to a
HeaderValue
. Read moresource§impl From<&XMatrix> for HeaderValue
impl From<&XMatrix> for HeaderValue
source§impl TryFrom<&HeaderValue> for XMatrix
impl TryFrom<&HeaderValue> for XMatrix
source§type Error = XMatrixParseError
type Error = XMatrixParseError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for XMatrix
impl RefUnwindSafe for XMatrix
impl Send for XMatrix
impl Sync for XMatrix
impl Unpin for XMatrix
impl UnwindSafe for XMatrix
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)