Struct ruma_client_api::context::get_context::v3::Response
source · [−]pub struct Response {
pub start: Option<String>,
pub end: Option<String>,
pub events_before: Vec<Raw<AnyRoomEvent>>,
pub event: Option<Raw<AnyRoomEvent>>,
pub events_after: Vec<Raw<AnyRoomEvent>>,
pub state: Vec<Raw<AnyStateEvent>>,
}Expand description
Data in the response from the get_context API endpoint.
Fields
start: Option<String>A token that can be used to paginate backwards with.
end: Option<String>A token that can be used to paginate forwards with.
events_before: Vec<Raw<AnyRoomEvent>>A list of room events that happened just before the requested event, in reverse-chronological order.
event: Option<Raw<AnyRoomEvent>>Details of the requested event.
events_after: Vec<Raw<AnyRoomEvent>>A list of room events that happened just after the requested event, in chronological order.
state: Vec<Raw<AnyStateEvent>>The state of the room at the last event returned.
Implementations
Trait Implementations
sourceimpl IncomingResponse for Response
Available on crate feature client only.
impl IncomingResponse for Response
client only.type EndpointError = Error
type EndpointError = Error
A type capturing the expected error conditions the server can return.
sourcefn try_from_http_response<T: AsRef<[u8]>>(
response: Response<T>
) -> Result<Self, FromHttpResponseError<Error>>
fn try_from_http_response<T: AsRef<[u8]>>(
response: Response<T>
) -> Result<Self, FromHttpResponseError<Error>>
Tries to convert the given http::Response into this response type.
sourceimpl OutgoingResponse for Response
Available on crate feature server only.
impl OutgoingResponse for Response
server only.sourcefn try_into_http_response<T: Default + BufMut>(
self
) -> Result<Response<T>, IntoHttpError>
fn try_into_http_response<T: Default + BufMut>(
self
) -> Result<Response<T>, IntoHttpError>
Tries to convert this response into an http::Response. Read more
Auto Trait Implementations
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
