Struct sysadmin_bindings::SysadminClient
[−]
[src]
pub struct SysadminClient { /* fields omitted */ }SysadminClient manages the connection and provides methods for sending specific commands. Each command returns a response in the form of a struct specific to that command. E.g. "SysadminClient.get" returns "GetResponse"
Note that the response structs used by the sysadmin lib are a close,
but not exact, mappings of the protobut defined responses.
For example the "id" and "status" from Response" are merged into
"[Get|Set|Whatever]Response" structs.
Errors are returned as error-chain errors.
Note the "Result" being returned is a type alias generated by error-chain for:
type Result
Methods
impl SysadminClient[src]
fn new(timeout: Duration, xid: u32, id: u32) -> SysadminClient[src]
fn connect<A: ToSocketAddrs>(&mut self, address: A) -> Result<()>[src]
Init the connection. You can call this method again to init
a new connection.
"address" will become a SocketAddr using the trait
[ToSocketAddrs]: https://doc.rust-lang.org/std/net/trait.ToSocketAddrs.html
fn set_xid(&mut self, xid: u32)[src]
fn set_id(&mut self, id: u32)[src]
fn get_xid(&self) -> &u32[src]
fn get_id(&self) -> &u32[src]
Trait Implementations
impl Default for SysadminClient[src]
fn default() -> SysadminClient[src]
Returns the "default value" for a type. Read more