pub struct StoredSession {
pub homeserver: Url,
pub user_id: OwnedUserId,
pub device_id: OwnedDeviceId,
pub id: String,
pub secret: Secret,
}
Expand description
A session, as stored in the secret service.
Fields§
§homeserver: Url
The URL of the homeserver where the account lives.
user_id: OwnedUserId
The unique identifier of the user.
device_id: OwnedDeviceId
The unique identifier of the session on the homeserver.
id: String
The unique local identifier of the session.
This is the name of the directories where the session data lives.
secret: Secret
The secrets of the session.
Implementations§
source§impl StoredSession
impl StoredSession
sourceasync fn try_from_secret_item(item: Item) -> Result<Self, LinuxSecretError>
async fn try_from_secret_item(item: Item) -> Result<Self, LinuxSecretError>
Build self from a secret.
sourcefn attributes(&self) -> HashMap<&'static str, String>
fn attributes(&self) -> HashMap<&'static str, String>
Get the attributes from self
.
source§impl StoredSession
impl StoredSession
sourcepub fn with_login_data(homeserver: Url, data: MatrixSession) -> Result<Self, ()>
pub fn with_login_data(homeserver: Url, data: MatrixSession) -> Result<Self, ()>
Construct a StoredSession
from the given login data.
Returns an error if we failed to generate a unique session ID for the new session.
sourcepub fn cache_path(&self) -> PathBuf
pub fn cache_path(&self) -> PathBuf
The path where the cached data of this session lives.
Trait Implementations§
source§impl BoxedType for StoredSession
impl BoxedType for StoredSession
source§impl Clone for StoredSession
impl Clone for StoredSession
source§fn clone(&self) -> StoredSession
fn clone(&self) -> StoredSession
Returns a copy of the value. Read more
1.0.0 · 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 StoredSession
impl Debug for StoredSession
source§impl From<StoredSession> for Value
impl From<StoredSession> for Value
source§fn from(v: StoredSession) -> Self
fn from(v: StoredSession) -> Self
Converts to this type from the input type.
source§impl FromGlibPtrBorrow<*const StoredSession> for StoredSession
impl FromGlibPtrBorrow<*const StoredSession> for StoredSession
source§unsafe fn from_glib_borrow(ptr: *const StoredSession) -> Borrowed<Self>
unsafe fn from_glib_borrow(ptr: *const StoredSession) -> Borrowed<Self>
Safety Read more
source§impl FromGlibPtrBorrow<*mut StoredSession> for StoredSession
impl FromGlibPtrBorrow<*mut StoredSession> for StoredSession
source§unsafe fn from_glib_borrow(ptr: *mut StoredSession) -> Borrowed<Self>
unsafe fn from_glib_borrow(ptr: *mut StoredSession) -> Borrowed<Self>
Safety Read more
source§impl FromGlibPtrFull<*mut StoredSession> for StoredSession
impl FromGlibPtrFull<*mut StoredSession> for StoredSession
source§unsafe fn from_glib_full(ptr: *mut StoredSession) -> Self
unsafe fn from_glib_full(ptr: *mut StoredSession) -> Self
Safety Read more
source§impl FromGlibPtrNone<*const StoredSession> for StoredSession
impl FromGlibPtrNone<*const StoredSession> for StoredSession
source§unsafe fn from_glib_none(ptr: *const StoredSession) -> Self
unsafe fn from_glib_none(ptr: *const StoredSession) -> Self
Safety Read more
source§impl FromGlibPtrNone<*mut StoredSession> for StoredSession
impl FromGlibPtrNone<*mut StoredSession> for StoredSession
source§unsafe fn from_glib_none(ptr: *mut StoredSession) -> Self
unsafe fn from_glib_none(ptr: *mut StoredSession) -> Self
Safety Read more
source§impl<'a> FromValue<'a> for &'a StoredSession
impl<'a> FromValue<'a> for &'a StoredSession
source§type Checker = GenericValueTypeChecker<&'a StoredSession>
type Checker = GenericValueTypeChecker<&'a StoredSession>
Value type checker.
source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a
Value
. Read moresource§impl<'a> FromValue<'a> for StoredSession
impl<'a> FromValue<'a> for StoredSession
source§type Checker = GenericValueTypeChecker<StoredSession>
type Checker = GenericValueTypeChecker<StoredSession>
Value type checker.
source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a
Value
. Read moresource§impl GlibPtrDefault for StoredSession
impl GlibPtrDefault for StoredSession
type GlibType = *mut StoredSession
source§impl HasParamSpec for StoredSession
impl HasParamSpec for StoredSession
type ParamSpec = ParamSpecBoxed
source§type SetValue = StoredSession
type SetValue = StoredSession
Preferred value to be used as setter for the associated ParamSpec.
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, StoredSession>
fn param_spec_builder() -> Self::BuilderFn
source§impl IntoGlibPtr<*mut StoredSession> for StoredSession
impl IntoGlibPtr<*mut StoredSession> for StoredSession
source§unsafe fn into_glib_ptr(self) -> *mut StoredSession
unsafe fn into_glib_ptr(self) -> *mut StoredSession
Transfer: full.
source§impl StaticType for StoredSession
impl StaticType for StoredSession
source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.source§impl<'a> ToGlibPtr<'a, *const StoredSession> for StoredSession
impl<'a> ToGlibPtr<'a, *const StoredSession> for StoredSession
type Storage = PhantomData<&'a StoredSession>
source§fn to_glib_none(&'a self) -> Stash<'a, *const StoredSession, Self>
fn to_glib_none(&'a self) -> Stash<'a, *const StoredSession, Self>
Transfer: none. Read more
source§fn to_glib_full(&self) -> *const StoredSession
fn to_glib_full(&self) -> *const StoredSession
Transfer: full. Read more
source§fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
Transfer: container. Read more
source§impl<'a> ToGlibPtr<'a, *mut StoredSession> for StoredSession
impl<'a> ToGlibPtr<'a, *mut StoredSession> for StoredSession
type Storage = PhantomData<&'a StoredSession>
source§fn to_glib_none(&'a self) -> Stash<'a, *mut StoredSession, Self>
fn to_glib_none(&'a self) -> Stash<'a, *mut StoredSession, Self>
Transfer: none. Read more
source§fn to_glib_full(&self) -> *mut StoredSession
fn to_glib_full(&self) -> *mut StoredSession
Transfer: full. Read more
source§fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
Transfer: container. Read more
source§impl ToValue for StoredSession
impl ToValue for StoredSession
source§impl ValueType for StoredSession
impl ValueType for StoredSession
source§type Type = StoredSession
type Type = StoredSession
Type to get the
Type
from. Read moreimpl TransparentPtrType for StoredSession
Auto Trait Implementations§
impl Freeze for StoredSession
impl RefUnwindSafe for StoredSession
impl Send for StoredSession
impl Sync for StoredSession
impl Unpin for StoredSession
impl UnwindSafe for StoredSession
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
source§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue
clone of self
.