mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +01:00
rename RumaResponse to Ra
It's very commonly used so having a short name is worthwhile, I think.
This commit is contained in:
parent
230ebd3884
commit
7ea98dac72
38 changed files with 332 additions and 351 deletions
|
|
@ -28,16 +28,20 @@ impl<T> Deref for Ruma<T> {
|
|||
}
|
||||
}
|
||||
|
||||
/// A wrapper to convert Ruma data to an Axum response
|
||||
///
|
||||
/// Named so because this converts from **R**uma to **A**xum. See also [`Ruma`],
|
||||
/// which is roughly the inverse of this type.
|
||||
#[derive(Clone)]
|
||||
pub(crate) struct RumaResponse<T>(pub(crate) T);
|
||||
pub(crate) struct Ra<T>(pub(crate) T);
|
||||
|
||||
impl<T> From<T> for RumaResponse<T> {
|
||||
impl<T> From<T> for Ra<T> {
|
||||
fn from(t: T) -> Self {
|
||||
Self(t)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Error> for RumaResponse<UiaaResponse> {
|
||||
impl From<Error> for Ra<UiaaResponse> {
|
||||
fn from(t: Error) -> Self {
|
||||
t.to_response()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue