pub struct UdsClient { /* private fields */ }Expand description
High-level HTTP client that talks to a server process through a temporary Unix-domain socket (or Windows named pipe).
The client:
- lazily establishes a connection on first use and caches it,
- attaches 180 s read/write time-outs (configurable per request),
- silently recycles the stream on I/O or (de-)serialisation errors, and
- limits response bodies to 16 MiB as a defence-in-depth measure.
Implementations§
Trait Implementations§
Source§impl ServerClient for UdsClient
impl ServerClient for UdsClient
fn get_raw(&self, path: &str) -> Result<Vec<u8>>
fn post_raw(&self, path: &str, body: &[u8]) -> Result<Vec<u8>>
fn stop(&self) -> Result<()>
Auto Trait Implementations§
impl !Freeze for UdsClient
impl RefUnwindSafe for UdsClient
impl Send for UdsClient
impl Sync for UdsClient
impl Unpin for UdsClient
impl UnsafeUnpin for UdsClient
impl UnwindSafe for UdsClient
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServerClientExt for Twhere
T: ServerClient + ?Sized,
impl<T> ServerClientExt for Twhere
T: ServerClient + ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.