pub struct Client { /* private fields */ }Expand description
A timeout-bounded local client. Every call receives a complete fresh frame.
Implementations§
Source§impl Client
impl Client
Sourcepub fn submit_attributed(
&self,
submission: Submission,
requirements: Vec<RequirementAttribution>,
) -> Result<Status>
pub fn submit_attributed( &self, submission: Submission, requirements: Vec<RequirementAttribution>, ) -> Result<Status>
Legacy attributed submission, retained for wire compatibility. Services since 0.3 do not advertise this capability and refuse the call.
§Errors
Refuses older services, unsupported modes and invalid attributions without falling back to an unattributed submission.
Sourcepub fn attributed_assurance(&self, id: &str) -> Result<View>
pub fn attributed_assurance(&self, id: &str) -> Result<View>
Legacy assurance read, retained for wire compatibility. Services since 0.3 do not advertise this capability and refuse the call.
§Errors
Refuses unsupported services, unknown or unattributed jobs and invalid evidence.
Sourcepub fn new(socket: impl Into<PathBuf>) -> Self
pub fn new(socket: impl Into<PathBuf>) -> Self
A client for socket; no connection or side effect until a call.
Sourcepub fn call(&self, request: &Request) -> Result<Response>
pub fn call(&self, request: &Request) -> Result<Response>
Sends one RPC with five-second I/O deadlines.
§Errors
Returns connection, framing, timeout, or server errors.
Sourcepub fn call_with(
&self,
request: &Request,
connected: impl FnOnce(UnixStream),
) -> Result<Response>
pub fn call_with( &self, request: &Request, connected: impl FnOnce(UnixStream), ) -> Result<Response>
Like Client::call, first handing connected a clone of the
connected stream. Another thread can shut that clone down to abandon
the call; connected is not called when the connection fails.
§Errors
Returns connection, framing, timeout, or server errors.