pub struct RpcClient { /* private fields */ }Expand description
RPC client for connecting to a running daemon.
Implementations§
Source§impl RpcClient
impl RpcClient
Sourcepub fn connect(addr: &RpcAddr, auth_key: &[u8; 32]) -> Result<Self>
pub fn connect(addr: &RpcAddr, auth_key: &[u8; 32]) -> Result<Self>
Connect to an RPC server and authenticate.
Sourcepub fn call(&mut self, request: &PickleValue) -> Result<PickleValue>
pub fn call(&mut self, request: &PickleValue) -> Result<PickleValue>
Send a pickle request and receive a pickle response.
pub fn list_hooks(&mut self) -> Result<Vec<HookInfo>>
pub fn begin_drain(&mut self, timeout: Duration) -> Result<bool>
pub fn drain_status(&mut self) -> Result<Option<DrainStatus>>
pub fn provider_bridge_stats(&mut self) -> Result<PickleValue>
pub fn load_hook( &mut self, name: &str, attach_point: &str, priority: i32, wasm: &[u8], ) -> Result<Result<(), String>>
pub fn unload_hook( &mut self, name: &str, attach_point: &str, ) -> Result<Result<(), String>>
pub fn set_hook_enabled( &mut self, name: &str, attach_point: &str, enabled: bool, ) -> Result<Result<(), String>>
pub fn set_hook_priority( &mut self, name: &str, attach_point: &str, priority: i32, ) -> Result<Result<(), String>>
pub fn blacklist_backbone_peer( &mut self, interface: &str, ip: &str, duration_secs: u64, reason: Option<&str>, penalty_level: Option<u8>, ) -> Result<bool>
Auto Trait Implementations§
impl Freeze for RpcClient
impl RefUnwindSafe for RpcClient
impl Send for RpcClient
impl Sync for RpcClient
impl Unpin for RpcClient
impl UnsafeUnpin for RpcClient
impl UnwindSafe for RpcClient
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> InterfaceConfigData for Twhere
T: Send + 'static,
impl<T> InterfaceConfigData for Twhere
T: Send + 'static,
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