pub struct AppServerClient { /* private fields */ }Expand description
A connected, initialized app-server client.
Implementations§
Source§impl AppServerClient
impl AppServerClient
Sourcepub async fn connect(path: &Path) -> Result<Self>
pub async fn connect(path: &Path) -> Result<Self>
Connects to the app-server listening on the Unix socket path and runs
the initialize handshake.
Sourcepub async fn loaded_threads(&mut self) -> Result<Vec<String>>
pub async fn loaded_threads(&mut self) -> Result<Vec<String>>
The ids of the threads loaded in the server.
Sourcepub async fn read_thread(&mut self, id: &str) -> Result<Option<ThreadView>>
pub async fn read_thread(&mut self, id: &str) -> Result<Option<ThreadView>>
One thread’s metadata and status, without its turns.
Sourcepub async fn snapshot(&mut self) -> Result<Snapshot>
pub async fn snapshot(&mut self) -> Result<Snapshot>
One poll of the server: the loaded thread ids, and the view of every
loaded top-level thread that could be read. A thread whose read fails
(it unloaded between the two calls, or the read timed out) is simply
missing from views this poll; only a failed thread/loaded/list is an
error.
Auto Trait Implementations§
impl !Freeze for AppServerClient
impl !RefUnwindSafe for AppServerClient
impl !UnwindSafe for AppServerClient
impl Send for AppServerClient
impl Sync for AppServerClient
impl Unpin for AppServerClient
impl UnsafeUnpin for AppServerClient
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
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