pub struct SessionProxy<'p>(/* private fields */);

Implementations§

source§

impl<'p> SessionProxy<'p>

source

pub async fn new(conn: &Connection) -> Result<SessionProxy<'p>>

Creates a new proxy with the default service and path.

source

pub fn builder(conn: &Connection) -> Builder<'p, Self>

Returns a customizable builder for this proxy.

source

pub fn into_inner(self) -> Proxy<'p>

Consumes self, returning the underlying zbus::Proxy.

source

pub fn inner(&self) -> &Proxy<'p>

The reference to the underlying zbus::Proxy.

source

pub fn inner_mut(&mut self) -> &mut Proxy<'p>

The mutable reference to the underlying zbus::Proxy.

source

pub async fn activate(&self) -> Result<()>

Activate method

source

pub async fn kill(&self, who: &str, signal_number: i32) -> Result<()>

Kill method

source

pub async fn lock(&self) -> Result<()>

Lock method

source

pub async fn pause_device_complete(&self, major: u32, minor: u32) -> Result<()>

PauseDeviceComplete method

source

pub async fn release_control(&self) -> Result<()>

ReleaseControl method

source

pub async fn release_device(&self, major: u32, minor: u32) -> Result<()>

ReleaseDevice method

source

pub async fn set_brightness( &self, subsystem: &str, name: &str, brightness: u32 ) -> Result<()>

SetBrightness method

source

pub async fn set_idle_hint(&self, idle: bool) -> Result<()>

SetIdleHint method

source

pub async fn set_locked_hint(&self, locked: bool) -> Result<()>

SetLockedHint method

source

pub async fn set_type(&self, type_: &str) -> Result<()>

SetType method

source

pub async fn take_control(&self, force: bool) -> Result<()>

TakeControl method

source

pub async fn take_device(&self, major: u32, minor: u32) -> Result<Device>

TakeDevice method

source

pub async fn terminate(&self) -> Result<()>

Terminate method

source

pub async fn unlock(&self) -> Result<()>

Unlock method

source

pub async fn receive_lock(&self) -> Result<LockStream<'static>>

Create a stream that receives Lock signals.

This a convenient wrapper around zbus::Proxy::receive_signal. Lock signal

source

pub async fn receive_pause_device(&self) -> Result<PauseDeviceStream<'static>>

Create a stream that receives PauseDevice signals.

This a convenient wrapper around zbus::Proxy::receive_signal. PauseDevice signal

source

pub async fn receive_pause_device_with_args( &self, args: &[(u8, &str)] ) -> Result<PauseDeviceStream<'static>>

Create a stream that receives PauseDevice signals.

This a convenient wrapper around zbus::Proxy::receive_signal_with_args. PauseDevice signal

source

pub async fn receive_resume_device(&self) -> Result<ResumeDeviceStream<'static>>

Create a stream that receives ResumeDevice signals.

This a convenient wrapper around zbus::Proxy::receive_signal. ResumeDevice signal

source

pub async fn receive_resume_device_with_args( &self, args: &[(u8, &str)] ) -> Result<ResumeDeviceStream<'static>>

Create a stream that receives ResumeDevice signals.

This a convenient wrapper around zbus::Proxy::receive_signal_with_args. ResumeDevice signal

source

pub async fn receive_unlock(&self) -> Result<UnlockStream<'static>>

Create a stream that receives Unlock signals.

This a convenient wrapper around zbus::Proxy::receive_signal. Unlock signal

source

pub async fn active(&self) -> Result<bool>

Active property

source

pub fn cached_active( &self ) -> Result<Option<<Result<bool> as ResultAdapter>::Ok>, <Result<bool> as ResultAdapter>::Err>

Get the cached value of the Active property, or None if the property is not cached.

source

pub async fn receive_active_changed( &self ) -> PropertyStream<'p, <Result<bool> as ResultAdapter>::Ok>

Create a stream for the Active property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn audit(&self) -> Result<u32>

Audit property

source

pub fn cached_audit( &self ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>

Get the cached value of the Audit property, or None if the property is not cached.

source

pub async fn receive_audit_changed( &self ) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>

Create a stream for the Audit property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn class(&self) -> Result<SessionClass>

Class property

source

pub fn cached_class( &self ) -> Result<Option<<Result<SessionClass> as ResultAdapter>::Ok>, <Result<SessionClass> as ResultAdapter>::Err>

Get the cached value of the Class property, or None if the property is not cached.

source

pub async fn receive_class_changed( &self ) -> PropertyStream<'p, <Result<SessionClass> as ResultAdapter>::Ok>

Create a stream for the Class property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn desktop(&self) -> Result<String>

Desktop property

source

pub fn cached_desktop( &self ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

Get the cached value of the Desktop property, or None if the property is not cached.

source

pub async fn receive_desktop_changed( &self ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

Create a stream for the Desktop property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn display(&self) -> Result<String>

Display property

source

pub fn cached_display( &self ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

Get the cached value of the Display property, or None if the property is not cached.

source

pub async fn receive_display_changed( &self ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

Create a stream for the Display property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn id(&self) -> Result<String>

Id property

source

pub fn cached_id( &self ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

Get the cached value of the Id property, or None if the property is not cached.

source

pub async fn receive_id_changed( &self ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

Create a stream for the Id property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn idle_hint(&self) -> Result<bool>

IdleHint property

source

pub fn cached_idle_hint( &self ) -> Result<Option<<Result<bool> as ResultAdapter>::Ok>, <Result<bool> as ResultAdapter>::Err>

Get the cached value of the IdleHint property, or None if the property is not cached.

source

pub async fn receive_idle_hint_changed( &self ) -> PropertyStream<'p, <Result<bool> as ResultAdapter>::Ok>

Create a stream for the IdleHint property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn idle_since_hint(&self) -> Result<TimeStamp>

IdleSinceHint property

source

pub fn cached_idle_since_hint( &self ) -> Result<Option<<Result<TimeStamp> as ResultAdapter>::Ok>, <Result<TimeStamp> as ResultAdapter>::Err>

Get the cached value of the IdleSinceHint property, or None if the property is not cached.

source

pub async fn receive_idle_since_hint_changed( &self ) -> PropertyStream<'p, <Result<TimeStamp> as ResultAdapter>::Ok>

Create a stream for the IdleSinceHint property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn idle_since_hint_monotonic(&self) -> Result<TimeStamp>

IdleSinceHintMonotonic property

source

pub fn cached_idle_since_hint_monotonic( &self ) -> Result<Option<<Result<TimeStamp> as ResultAdapter>::Ok>, <Result<TimeStamp> as ResultAdapter>::Err>

Get the cached value of the IdleSinceHintMonotonic property, or None if the property is not cached.

source

pub async fn receive_idle_since_hint_monotonic_changed( &self ) -> PropertyStream<'p, <Result<TimeStamp> as ResultAdapter>::Ok>

Create a stream for the IdleSinceHintMonotonic property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn leader(&self) -> Result<u32>

Leader property

source

pub fn cached_leader( &self ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>

Get the cached value of the Leader property, or None if the property is not cached.

source

pub async fn receive_leader_changed( &self ) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>

Create a stream for the Leader property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn locked_hint(&self) -> Result<bool>

LockedHint property

source

pub fn cached_locked_hint( &self ) -> Result<Option<<Result<bool> as ResultAdapter>::Ok>, <Result<bool> as ResultAdapter>::Err>

Get the cached value of the LockedHint property, or None if the property is not cached.

source

pub async fn receive_locked_hint_changed( &self ) -> PropertyStream<'p, <Result<bool> as ResultAdapter>::Ok>

Create a stream for the LockedHint property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn name(&self) -> Result<String>

Name property

source

pub fn cached_name( &self ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

Get the cached value of the Name property, or None if the property is not cached.

source

pub async fn receive_name_changed( &self ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

Create a stream for the Name property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn remote(&self) -> Result<bool>

Remote property

source

pub fn cached_remote( &self ) -> Result<Option<<Result<bool> as ResultAdapter>::Ok>, <Result<bool> as ResultAdapter>::Err>

Get the cached value of the Remote property, or None if the property is not cached.

source

pub async fn receive_remote_changed( &self ) -> PropertyStream<'p, <Result<bool> as ResultAdapter>::Ok>

Create a stream for the Remote property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn remote_host(&self) -> Result<String>

RemoteHost property

source

pub fn cached_remote_host( &self ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

Get the cached value of the RemoteHost property, or None if the property is not cached.

source

pub async fn receive_remote_host_changed( &self ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

Create a stream for the RemoteHost property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn remote_user(&self) -> Result<String>

RemoteUser property

source

pub fn cached_remote_user( &self ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

Get the cached value of the RemoteUser property, or None if the property is not cached.

source

pub async fn receive_remote_user_changed( &self ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

Create a stream for the RemoteUser property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn scope(&self) -> Result<String>

Scope property

source

pub fn cached_scope( &self ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

Get the cached value of the Scope property, or None if the property is not cached.

source

pub async fn receive_scope_changed( &self ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

Create a stream for the Scope property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn seat(&self) -> Result<SomePath>

Seat property

source

pub fn cached_seat( &self ) -> Result<Option<<Result<SomePath> as ResultAdapter>::Ok>, <Result<SomePath> as ResultAdapter>::Err>

Get the cached value of the Seat property, or None if the property is not cached.

source

pub async fn receive_seat_changed( &self ) -> PropertyStream<'p, <Result<SomePath> as ResultAdapter>::Ok>

Create a stream for the Seat property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn service(&self) -> Result<String>

Service property

source

pub fn cached_service( &self ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

Get the cached value of the Service property, or None if the property is not cached.

source

pub async fn receive_service_changed( &self ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

Create a stream for the Service property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn state(&self) -> Result<SessionState>

State property

source

pub fn cached_state( &self ) -> Result<Option<<Result<SessionState> as ResultAdapter>::Ok>, <Result<SessionState> as ResultAdapter>::Err>

Get the cached value of the State property, or None if the property is not cached.

source

pub async fn receive_state_changed( &self ) -> PropertyStream<'p, <Result<SessionState> as ResultAdapter>::Ok>

Create a stream for the State property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn TTY(&self) -> Result<String>

TTY property

source

pub fn cached_TTY( &self ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

Get the cached value of the TTY property, or None if the property is not cached.

source

pub async fn receive_TTY_changed( &self ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

Create a stream for the TTY property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn timestamp(&self) -> Result<TimeStamp>

Timestamp property

source

pub fn cached_timestamp( &self ) -> Result<Option<<Result<TimeStamp> as ResultAdapter>::Ok>, <Result<TimeStamp> as ResultAdapter>::Err>

Get the cached value of the Timestamp property, or None if the property is not cached.

source

pub async fn receive_timestamp_changed( &self ) -> PropertyStream<'p, <Result<TimeStamp> as ResultAdapter>::Ok>

Create a stream for the Timestamp property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn timestamp_monotonic(&self) -> Result<TimeStamp>

TimestampMonotonic property

source

pub fn cached_timestamp_monotonic( &self ) -> Result<Option<<Result<TimeStamp> as ResultAdapter>::Ok>, <Result<TimeStamp> as ResultAdapter>::Err>

Get the cached value of the TimestampMonotonic property, or None if the property is not cached.

source

pub async fn receive_timestamp_monotonic_changed( &self ) -> PropertyStream<'p, <Result<TimeStamp> as ResultAdapter>::Ok>

Create a stream for the TimestampMonotonic property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn type_(&self) -> Result<SessionType>

Type property

source

pub fn cached_type_( &self ) -> Result<Option<<Result<SessionType> as ResultAdapter>::Ok>, <Result<SessionType> as ResultAdapter>::Err>

Get the cached value of the Type property, or None if the property is not cached.

source

pub async fn receive_type__changed( &self ) -> PropertyStream<'p, <Result<SessionType> as ResultAdapter>::Ok>

Create a stream for the Type property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn user(&self) -> Result<User>

User property

source

pub fn cached_user( &self ) -> Result<Option<<Result<User> as ResultAdapter>::Ok>, <Result<User> as ResultAdapter>::Err>

Get the cached value of the User property, or None if the property is not cached.

source

pub async fn receive_user_changed( &self ) -> PropertyStream<'p, <Result<User> as ResultAdapter>::Ok>

Create a stream for the User property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

source

pub async fn VTNr(&self) -> Result<u32>

VTNr property

source

pub fn cached_VTNr( &self ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>

Get the cached value of the VTNr property, or None if the property is not cached.

source

pub async fn receive_VTNr_changed( &self ) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>

Create a stream for the VTNr property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.

Trait Implementations§

source§

impl<'p> AsMut<Proxy<'p>> for SessionProxy<'p>

source§

fn as_mut(&mut self) -> &mut Proxy<'p>

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<'p> AsRef<Proxy<'p>> for SessionProxy<'p>

source§

fn as_ref(&self) -> &Proxy<'p>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<'p> Clone for SessionProxy<'p>

source§

fn clone(&self) -> SessionProxy<'p>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'p> Debug for SessionProxy<'p>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'p> From<Proxy<'p>> for SessionProxy<'p>

source§

fn from(proxy: Proxy<'p>) -> Self

Converts to this type from the input type.
source§

impl<'a> ProxyDefault for SessionProxy<'a>

source§

const INTERFACE: Option<&'static str> = _

source§

const DESTINATION: Option<&'static str> = _

source§

const PATH: Option<&'static str> = _

source§

impl<'p> ProxyImpl<'p> for SessionProxy<'p>

source§

fn builder(conn: &Connection) -> Builder<'p, Self>

Returns a customizable builder for this proxy.
source§

fn into_inner(self) -> Proxy<'p>

Consumes self, returning the underlying zbus::Proxy.
source§

fn inner(&self) -> &Proxy<'p>

The reference to the underlying zbus::Proxy.
source§

impl<'p> Serialize for SessionProxy<'p>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'p> Type for SessionProxy<'p>

source§

fn signature() -> Signature<'static>

Get the signature for the implementing type. Read more

Auto Trait Implementations§

§

impl<'p> Freeze for SessionProxy<'p>

§

impl<'p> !RefUnwindSafe for SessionProxy<'p>

§

impl<'p> Send for SessionProxy<'p>

§

impl<'p> Sync for SessionProxy<'p>

§

impl<'p> Unpin for SessionProxy<'p>

§

impl<'p> !UnwindSafe for SessionProxy<'p>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynamicType for T
where T: Type + ?Sized,

source§

fn dynamic_signature(&self) -> Signature<'_>

Get the signature for the implementing type. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more