pub struct WhoAmIReply {
pub user: UserSummary,
pub can_leave: bool,
}Expand description
What WhoAmI answers: the session’s user, and whether they may leave
the server. On the wire the user’s fields and can_leave sit in one
map, so a client that does not know can_leave reads it as a
UserSummary.
Fields§
§user: UserSummary§can_leave: boolLeaveServer would be done, not refused with LastAdmin:
false for the last enabled admin, or the last enabled admin with a
password, so an app can grey out “Leave this server” before it is
asked. As of this answer: an admin made or demoted later changes
it.
Trait Implementations§
Source§impl Clone for WhoAmIReply
impl Clone for WhoAmIReply
Source§impl Debug for WhoAmIReply
impl Debug for WhoAmIReply
Source§impl<'de> Deserialize<'de> for WhoAmIReply
impl<'de> Deserialize<'de> for WhoAmIReply
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for WhoAmIReply
Source§impl PartialEq for WhoAmIReply
impl PartialEq for WhoAmIReply
Source§impl Serialize for WhoAmIReply
impl Serialize for WhoAmIReply
impl StructuralPartialEq for WhoAmIReply
Auto Trait Implementations§
impl Forget for WhoAmIReply
impl Freeze for WhoAmIReply
impl Move for WhoAmIReply
impl RefUnwindSafe for WhoAmIReply
impl Send for WhoAmIReply
impl Sync for WhoAmIReply
impl Unpin for WhoAmIReply
impl UnsafeUnpin for WhoAmIReply
impl UnwindSafe for WhoAmIReply
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
Mutably borrows from an owned value. Read more