pub struct Client { /* private fields */ }Expand description
A synchronous client for the beachcomber daemon.
Each method call creates a new socket connection. For multiple
queries in sequence, use Session instead.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a client with default configuration (100ms timeout, auto-start enabled).
Sourcepub fn with_config(config: ClientConfig) -> Self
pub fn with_config(config: ClientConfig) -> Self
Create a client with custom configuration.
Sourcepub fn get(
&self,
key: &str,
path: Option<&str>,
) -> Result<CombResult, CombError>
pub fn get( &self, key: &str, path: Option<&str>, ) -> Result<CombResult, CombError>
Query a single key. Returns Hit with data, Miss, or an error.
Examples:
client.get("git.branch", Some("/path/to/repo"))— single fieldclient.get("git", Some("/path/to/repo"))— all fieldsclient.get("hostname.short", None)— global provider
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl UnwindSafe for Client
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