pub trait Metadata: Sized {
type Authentication: AuthScheme;
const METHOD: Method;
const RATE_LIMITED: bool;
const HISTORY: VersionHistory;
// Provided methods
fn empty_request_body<B>() -> B
where B: Default + BufMut { ... }
fn make_endpoint_url(
considering: &SupportedVersions,
base_url: &str,
path_args: &[&dyn Display],
query_string: &str,
) -> Result<String, IntoHttpError> { ... }
}
Available on crate feature
api
only.Expand description
Metadata about an API endpoint.
Required Associated Constants§
Sourceconst RATE_LIMITED: bool
const RATE_LIMITED: bool
Whether or not this endpoint is rate limited by the server.
Sourceconst HISTORY: VersionHistory
const HISTORY: VersionHistory
All info pertaining to an endpoint’s (historic) paths, deprecation version, and removal.
Required Associated Types§
Sourcetype Authentication: AuthScheme
type Authentication: AuthScheme
What authentication scheme the server uses for this endpoint.
Provided Methods§
Sourcefn empty_request_body<B>() -> B
fn empty_request_body<B>() -> B
Returns an empty request body for this Matrix request.
For GET
requests, it returns an entirely empty buffer, for others it returns an empty JSON
object ({}
).
Sourcefn make_endpoint_url(
considering: &SupportedVersions,
base_url: &str,
path_args: &[&dyn Display],
query_string: &str,
) -> Result<String, IntoHttpError>
fn make_endpoint_url( considering: &SupportedVersions, base_url: &str, path_args: &[&dyn Display], query_string: &str, ) -> Result<String, IntoHttpError>
Generate the endpoint URL for this endpoint.
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.