Struct FloatingSurfaceServiceClient
pub struct FloatingSurfaceServiceClient { /* private fields */ }Expand description
Non-blocking app-side connection to the session shell. The launcher hands
the already-connected socket into the sandbox as
TILO_SVC_SHELL-UI_FD; newline-delimited JSON keeps the tiny lifecycle
protocol inspectable and lets the compositor service evolve independently
of app/widget releases.
Implementations§
§impl FloatingSurfaceServiceClient
impl FloatingSurfaceServiceClient
pub fn discover() -> Option<FloatingSurfaceServiceClient>
pub fn discover() -> Option<FloatingSurfaceServiceClient>
Discover the optional session service. Outside Tilo (or on an older
shell) this returns None; apps retain their ordinary attached UI.
The inherited descriptor belongs to one app launch. Transport loss is
terminal for this client; only a fresh launcher-mediated launch supplies
a new connection. Discovery never opens a privileged host socket.
pub fn send(
&mut self,
message: &FloatingSurfaceClientMessage,
) -> Result<(), String>
pub fn send( &mut self, message: &FloatingSurfaceClientMessage, ) -> Result<(), String>
Queue and flush one client message.
§Errors
Returns an error when the message cannot be encoded, exceeds the protocol limit, or cannot be written to the service stream.
pub fn pump(&mut self) -> Result<Vec<FloatingSurfaceHostMessage>, String>
pub fn pump(&mut self) -> Result<Vec<FloatingSurfaceHostMessage>, String>
Flush queued writes and collect every complete host message currently
available. WouldBlock is ordinary idle state, never a disconnect.
§Errors
Returns an error when queued writes or incoming reads fail, the peer disconnects, a frame exceeds the protocol limit, or JSON is invalid.
Auto Trait Implementations§
impl Freeze for FloatingSurfaceServiceClient
impl RefUnwindSafe for FloatingSurfaceServiceClient
impl Send for FloatingSurfaceServiceClient
impl Sync for FloatingSurfaceServiceClient
impl Unpin for FloatingSurfaceServiceClient
impl UnsafeUnpin for FloatingSurfaceServiceClient
impl UnwindSafe for FloatingSurfaceServiceClient
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
§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>
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>
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)
&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)
&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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 more