pub struct LocalClient { /* private fields */ }Expand description
Client that loops back requests to a module in this process.
Implementations§
Source§impl LocalClient
impl LocalClient
Sourcepub fn new(modname: impl Into<String>) -> Option<Self>
pub fn new(modname: impl Into<String>) -> Option<Self>
Return a new local client connecting to the given module. None is returned if no local server is running.
pub fn ping(&self) -> Result<()>
pub fn read(&self, param: &str) -> Result<Value>
pub fn change(&self, param: &str, value: Value) -> Result<Value>
pub fn command(&self, cmd: &str, arg: Value) -> Result<Value>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocalClient
impl RefUnwindSafe for LocalClient
impl Send for LocalClient
impl Sync for LocalClient
impl Unpin for LocalClient
impl UnwindSafe for LocalClient
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> 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