pub struct WeTrustClient { /* private fields */ }Expand description
A client for the WeTrust protocol, similar to the JDBC implementation.
Implementations§
Source§impl WeTrustClient
impl WeTrustClient
pub async fn connect( addr: SocketAddr, tenant_id: Uuid, secret_key: Vec<u8>, ) -> Result<Self, DsError>
pub async fn send_request( &mut self, msg_type: MessageType, payload: Bytes, ) -> Result<TrustMessage, DsError>
pub async fn send_query( &mut self, sql: &str, ) -> Result<Vec<Vec<DsValue>>, DsError>
pub async fn put(&mut self, key: &str, value: DsValue) -> Result<(), DsError>
pub async fn get(&mut self, key: &str) -> Result<Option<DsValue>, DsError>
pub async fn delete(&mut self, key: &str) -> Result<(), DsError>
pub async fn kql(&mut self, query: &str) -> Result<DsValue, DsError>
pub async fn heartbeat(&mut self) -> Result<(), DsError>
Auto Trait Implementations§
impl !Freeze for WeTrustClient
impl RefUnwindSafe for WeTrustClient
impl Send for WeTrustClient
impl Sync for WeTrustClient
impl Unpin for WeTrustClient
impl UnsafeUnpin for WeTrustClient
impl UnwindSafe for WeTrustClient
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