appservice-api: Add constructor for push_events::v1::IncomingRequest

This commit is contained in:
Johannes Becker 2021-04-20 12:40:24 +02:00 committed by GitHub
parent 313830812f
commit bccdb74e15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,13 @@ impl<'a> Request<'a> {
} }
} }
impl IncomingRequest {
/// Creates an `IncomingRequest` with the given transaction ID and list of events.
pub fn new(txn_id: String, events: Vec<Raw<AnyEvent>>) -> IncomingRequest {
IncomingRequest { txn_id, events }
}
}
impl Response { impl Response {
/// Creates an empty `Response`. /// Creates an empty `Response`.
pub fn new() -> Self { pub fn new() -> Self {