pub struct AppServer { /* private fields */ }Expand description
A connected, initialised app-server client.
Implementations§
Source§impl AppServer
impl AppServer
Sourcepub async fn connect(socket: &Path, client_name: &str) -> Result<Self>
pub async fn connect(socket: &Path, client_name: &str) -> Result<Self>
Connect to the daemon’s socket, upgrade to WebSocket, and initialise
as client_name.
Sourcepub async fn request(&mut self, method: &str, params: Value) -> Result<Value>
pub async fn request(&mut self, method: &str, params: Value) -> Result<Value>
Send a request and wait for its response. Notifications received in
the meantime are queued for Self::next_notification. A request
the server sends us (an approval prompt) is answered with an error:
the adapter has no authority to approve anything.
Auto Trait Implementations§
impl !Freeze for AppServer
impl RefUnwindSafe for AppServer
impl Send for AppServer
impl Sync for AppServer
impl Unpin for AppServer
impl UnsafeUnpin for AppServer
impl UnwindSafe for AppServer
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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