Struct ClientManagerImpl

Source
pub struct ClientManagerImpl { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl ClientManager for ClientManagerImpl

Source§

fn register_client(&mut self, address: String, name: String)

Stores a new client to the internal store with the given client info
Source§

fn call_method( &self, client_name: &String, method_name: &String, arguments: Value, ) -> MethodResult

Calls a method on a remote client Opens a TCP connection to the registered address if the client exists On error an errored MethodResult will be returned with the message content of the error description
Source§

fn get_registered_clients(&self) -> Vec<String>

Returns the names of all registered clients
Source§

fn get_client(&self, client_name: &String) -> Option<Box<dyn Client>>

Gets the reference to a given client if exists Otherwise None is returned
Source§

fn remove_client(&mut self, client_name: &String) -> Result<(), String>

Removes a client if it is registered Will error with an error message if client is not registered

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.