pub struct Session<'a>(/* private fields */);
Expand description
Shared by all portal interfaces that involve long lived sessions.
When a method that creates a session is called, if successful, the reply will include a session handle (i.e. object path) for a Session object, which will stay alive for the duration of the session.
The duration of the session is defined by the interface that creates it.
For convenience, the interface contains a method Session::close
,
and a signal Session::receive_closed
. Whether it is allowed to
directly call Session::close
depends on the interface.
Wrapper of the DBus interface: org.freedesktop.portal.Session
.
Implementations§
source§impl<'a> Session<'a>
impl<'a> Session<'a>
sourcepub async fn receive_closed(
&self
) -> Result<impl Stream<Item = HashMap<String, OwnedValue>>, Error>
pub async fn receive_closed( &self ) -> Result<impl Stream<Item = HashMap<String, OwnedValue>>, Error>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Session<'a>
impl<'a> !RefUnwindSafe for Session<'a>
impl<'a> Send for Session<'a>
impl<'a> Sync for Session<'a>
impl<'a> Unpin for Session<'a>
impl<'a> !UnwindSafe for Session<'a>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> DynamicType for T
impl<T> DynamicType for T
source§fn dynamic_signature(&self) -> Signature<'_>
fn dynamic_signature(&self) -> Signature<'_>
Get the signature for the implementing type. Read more