pub struct StatsClient {
base_path: PathBuf,
sched_path: PathBuf,
stats_path: PathBuf,
path: Option<PathBuf>,
stream: Option<UnixStream>,
reader: Option<BufReader<UnixStream>>,
}Fields§
§base_path: PathBuf§sched_path: PathBuf§stats_path: PathBuf§path: Option<PathBuf>§stream: Option<UnixStream>§reader: Option<BufReader<UnixStream>>Implementations§
Source§impl StatsClient
impl StatsClient
pub fn new() -> Self
pub fn set_base_path<P: AsRef<Path>>(self, path: P) -> Self
pub fn set_sched_path<P: AsRef<Path>>(self, path: P) -> Self
pub fn set_stats_path<P: AsRef<Path>>(self, path: P) -> Self
pub fn set_path<P: AsRef<Path>>(self, path: P) -> Self
pub fn connect(self, timeout_ms: Option<u64>) -> Result<Self>
pub fn send_request<T>(&mut self, req: &StatsRequest) -> Result<T>where
T: for<'a> Deserialize<'a>,
pub fn request<T>(
&mut self,
req: &str,
args: Vec<(String, String)>,
) -> Result<T>where
T: for<'a> Deserialize<'a>,
Auto Trait Implementations§
impl Freeze for StatsClient
impl RefUnwindSafe for StatsClient
impl Send for StatsClient
impl Sync for StatsClient
impl Unpin for StatsClient
impl UnsafeUnpin for StatsClient
impl UnwindSafe for StatsClient
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