pub struct IdentityExport {
pub room_owner: VerifyingKey,
pub signing_key: SigningKey,
pub authorized_member: AuthorizedMember,
pub invite_chain: Vec<AuthorizedMember>,
pub member_info: Option<AuthorizedMemberInfo>,
pub room_name: Option<String>,
}Expand description
A portable identity bundle containing everything needed to restore a user’s room identity on a different client.
Fields§
§room_owner: VerifyingKeyThe room owner’s verifying key (identifies which room)
signing_key: SigningKeyThe user’s private signing key
The user’s signed membership proof
invite_chain: Vec<AuthorizedMember>Chain of AuthorizedMembers from this member up to the owner, needed for membership validation and rejoin after pruning
member_info: Option<AuthorizedMemberInfo>Optional member info (nickname etc.)
room_name: Option<String>Room display name (shown immediately on import before sync completes)
Implementations§
Source§impl IdentityExport
impl IdentityExport
Sourcepub fn to_armored_string(&self) -> String
pub fn to_armored_string(&self) -> String
Encode as an armored string with header/footer and line wrapping.
Sourcepub fn from_armored_string(s: &str) -> Result<Self, String>
pub fn from_armored_string(s: &str) -> Result<Self, String>
Decode from an armored string, stripping header/footer and whitespace.
Trait Implementations§
Source§impl Clone for IdentityExport
impl Clone for IdentityExport
Source§fn clone(&self) -> IdentityExport
fn clone(&self) -> IdentityExport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IdentityExport
impl Debug for IdentityExport
Source§impl<'de> Deserialize<'de> for IdentityExport
impl<'de> Deserialize<'de> for IdentityExport
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
Auto Trait Implementations§
impl Freeze for IdentityExport
impl RefUnwindSafe for IdentityExport
impl Send for IdentityExport
impl Sync for IdentityExport
impl Unpin for IdentityExport
impl UnsafeUnpin for IdentityExport
impl UnwindSafe for IdentityExport
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