#[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