pub struct HostHandle {
pub tx: UnboundedSender<HostRequest>,
pub info: HostInfo,
/* private fields */
}Fields§
§tx: UnboundedSender<HostRequest>§info: HostInfoImplementations§
Source§impl HostHandle
impl HostHandle
Sourcepub fn new(
tx: UnboundedSender<HostRequest>,
info: HostInfo,
join: JoinHandle<()>,
) -> Self
pub fn new( tx: UnboundedSender<HostRequest>, info: HostInfo, join: JoinHandle<()>, ) -> Self
A host this handle owns: stop ends it and joins its thread.
Sourcepub fn attached(tx: UnboundedSender<HostRequest>, info: HostInfo) -> Self
pub fn attached(tx: UnboundedSender<HostRequest>, info: HostInfo) -> Self
A handle on a running app the server does not own.
pub fn is_owned(&self) -> bool
Sourcepub async fn call(&self, cmd: &str, args: Value) -> Result<Reply, String>
pub async fn call(&self, cmd: &str, args: Value) -> Result<Reply, String>
Run a command and await its reply.
Sourcepub async fn call_ok(&self, cmd: &str, args: Value) -> Result<Reply, String>
pub async fn call_ok(&self, cmd: &str, args: Value) -> Result<Reply, String>
Run a command; an ok: false reply becomes Err(error).
pub async fn screenshot( &self, region: Value, ) -> Result<(Value, Vec<u8>), String>
Auto Trait Implementations§
impl !Freeze for HostHandle
impl !RefUnwindSafe for HostHandle
impl !UnwindSafe for HostHandle
impl Send for HostHandle
impl Sync for HostHandle
impl Unpin for HostHandle
impl UnsafeUnpin for HostHandle
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> 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 more