pub struct RelayClient { /* private fields */ }Expand description
Loopback-only HTTP relay client; bearer is a local credential, not an IAM token.
Implementations§
Source§impl RelayClient
impl RelayClient
pub fn new(base: &str, token: impl Into<String>) -> Result<Self>
pub async fn submit( &self, request: &RelayRequest, ) -> Result<RelayAcknowledgement>
Sourcepub async fn submit_value(
&self,
request: &Value,
) -> Result<RelayAcknowledgement>
pub async fn submit_value( &self, request: &Value, ) -> Result<RelayAcknowledgement>
Preserves unknown JSON properties when acknowledging the caller’s exact request.
pub async fn result(&self, id: Uuid) -> Result<RelayResult>
Sourcepub async fn request_status(&self, id: Uuid) -> Result<RelayRequestStatus>
pub async fn request_status(&self, id: Uuid) -> Result<RelayRequestStatus>
Reads progress without transferring the queued request or result body.
Daemons released before this route existed return HTTP 404; callers can
fall back to Self::result for those installations.
pub async fn status(&self) -> Result<Value>
pub async fn stop(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for RelayClient
impl Clone for RelayClient
Source§fn clone(&self) -> RelayClient
fn clone(&self) -> RelayClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RelayClient
impl !UnwindSafe for RelayClient
impl Freeze for RelayClient
impl Send for RelayClient
impl Sync for RelayClient
impl Unpin for RelayClient
impl UnsafeUnpin for RelayClient
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