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 ::failure::errors.
Methods
impl SysadminClient[src]
pub fn new(timeout: Duration, xid: u32, id: u32) -> SysadminClient[src]
pub fn connect<A: ToSocketAddrs>(&mut self, address: A) -> SysadminResult<()>[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
pub fn set_xid(&mut self, xid: u32)[src]
pub fn set_id(&mut self, id: u32)[src]
pub fn get_xid(&self) -> &u32[src]
pub 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