pub struct Session<'a, T>(/* private fields */)
where
T: SessionPortal;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, T> Session<'a, T>where
T: SessionPortal,
impl<'a, T> Session<'a, T>where
T: SessionPortal,
Sourcepub async fn receive_closed(&self) -> Result<impl Stream<Item = ()>, Error>
pub async fn receive_closed(&self) -> Result<impl Stream<Item = ()>, Error>
Trait Implementations§
Source§impl<T> Debug for Session<'_, T>where
T: SessionPortal,
impl<T> Debug for Session<'_, T>where
T: SessionPortal,
Source§impl<T> Serialize for Session<'_, T>where
T: SessionPortal,
impl<T> Serialize for Session<'_, T>where
T: SessionPortal,
Auto Trait Implementations§
impl<'a, T> Freeze for Session<'a, T>
impl<'a, T> !RefUnwindSafe for Session<'a, T>
impl<'a, T> Send for Session<'a, T>where
T: Send,
impl<'a, T> Sync for Session<'a, T>where
T: Sync,
impl<'a, T> Unpin for Session<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for Session<'a, T>
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.