#[non_exhaustive]pub struct Response {
pub status_msg: Option<String>,
pub status: PresenceStatus,
pub currently_active: Option<bool>,
pub last_active_ago: Option<Duration>,
pub presence: PresenceState,
}client or server only.Expand description
Response type for the get_presence endpoint.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.status_msg: Option<String>Deprecated when MSC4532 is enabled, use status instead
The state message for this user if one was set.
If the unstable-msc4532 feature is enabled, this field will always have the same
value as status.msg after deserialization.
status: PresenceStatusunstable-msc4532 only.The status information for this user’s presence.
This field uses the unstable prefix defined in MSC4532.
If this field is not present at deserialization, the value of status_msg
will be used instead.
currently_active: Option<bool>Deprecated when MSC4532 is enabled, use PresenceState::currently_active instead
Whether the user is currently active or not.
If the unstable-msc4532 feature is enabled and presence is a MSC4532
presence state, this field will be ignored and will always have the same value
as PresenceState::currently_active after deserialization.
last_active_ago: Option<Duration>The length of time in milliseconds since an action was performed by the user.
presence: PresenceStateThe user’s presence state.
Implementations§
Trait Implementations§
Source§impl IncomingResponse for Response
Available on crate feature client only.
impl IncomingResponse for Response
client only.Source§type EndpointError = Error
type EndpointError = Error
Source§fn try_from_http_response_inner(
response: Response<&[u8]>,
) -> Result<Self, DeserializationError>
fn try_from_http_response_inner( response: Response<&[u8]>, ) -> Result<Self, DeserializationError>
http::Response into this response type. Read moreSource§impl OutgoingResponse for Response
Available on crate feature server only.
impl OutgoingResponse for Response
server only.Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> IncomingResponseExt for Twhere
T: IncomingResponse,
impl<T> IncomingResponseExt for Twhere
T: IncomingResponse,
Source§fn try_from_http_response(
response: Response<&[u8]>,
) -> Result<Self, FromHttpResponseError<Self::EndpointError>>
fn try_from_http_response( response: Response<&[u8]>, ) -> Result<Self, FromHttpResponseError<Self::EndpointError>>
http::Response into this response type.