pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn new() -> Self
Sourcepub async fn get_oobi(&self, url: &str) -> Result<Vec<u8>, ClientError>
pub async fn get_oobi(&self, url: &str) -> Result<Vec<u8>, ClientError>
GET an OOBI URL and return the CESR stream it serves.
Sourcepub async fn post_receipt(
&self,
base_url: &str,
dest: &str,
event: &[u8],
) -> Result<ReceiptResponse, ClientError>
pub async fn post_receipt( &self, base_url: &str, dest: &str, event: &[u8], ) -> Result<ReceiptResponse, ClientError>
POST one event (with its attachments) to {base_url}receipts, as keripy’s
Receiptor.receipt does with streamCESRRequests(path="receipts").
Sourcepub async fn send(
&self,
base_url: &str,
dest: &str,
stream: &[u8],
) -> Result<(), ClientError>
pub async fn send( &self, base_url: &str, dest: &str, stream: &[u8], ) -> Result<(), ClientError>
Send every message in a CESR stream to {base_url} (keripy HttpEnd),
one CESR-over-HTTP POST per message, as keripy streamCESRRequests
does. Not PUT: keripy’s HttpEnd.on_put reads only the raw body and
ignores the CESR-ATTACHMENT header, so attachments would be lost.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin 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