pub struct DwnClient {
pub tenant: Did,
pub request_handler: Box<dyn RequestHandlerT>,
pub protocols: Box<dyn KeyValueStore>,
pub did_resolver: Box<dyn DidResolver>,
pub p2p: Box<dyn P2P>,
}
Fields§
§tenant: Did
§request_handler: Box<dyn RequestHandlerT>
§protocols: Box<dyn KeyValueStore>
§did_resolver: Box<dyn DidResolver>
§p2p: Box<dyn P2P>
Implementations§
source§impl DwnClient
impl DwnClient
pub fn new<KVS: KeyValueStore + 'static>( tenant: Did, request_handler: Option<Box<dyn RequestHandlerT>>, protocols: Option<Box<dyn KeyValueStore>>, did_resolver: Box<dyn DidResolver>, p2p: Box<dyn P2P>, ) -> Result<Self, Error>
Trait Implementations§
source§impl Client for DwnClient
impl Client for DwnClient
fn create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
perms: &'life1 Permission,
record: Record,
dids: &'life2 [&'life3 Did],
) -> Pin<Box<dyn Future<Output = Result<Permission, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn read<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
perms: &'life1 Permission,
dids: &'life2 [&'life3 Did],
follow_perm: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<PermissionedRecord>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
perms: &'life1 Permission,
record: Record,
dids: &'life2 [&'life3 Did],
) -> Pin<Box<dyn Future<Output = Result<Permission, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn delete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
perms: &'life1 Permission,
dids: &'life2 [&'life3 Did],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn create_child<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
perms: &'life1 Permission,
latest_delete: usize,
permission: Permission,
dids: &'life2 [&'life3 Did],
) -> Pin<Box<dyn Future<Output = Result<(Permission, usize), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn read_child<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
perms: &'life1 Permission,
start: usize,
end: Option<usize>,
dids: &'life2 [&'life3 Did],
) -> Pin<Box<dyn Future<Output = Result<Vec<PermissionedRecord>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn delete_child<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
perms: &'life1 Permission,
index: usize,
dids: &'life2 [&'life3 Did],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn configure_protocol<'life0, 'async_trait>(
&'life0 mut self,
protocol: Protocol,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_protocol<'life0, 'life1, 'async_trait>(
&'life0 mut self,
protocol: &'life1 Hash,
) -> Pin<Box<dyn Future<Output = Result<Protocol, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_did_msg<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sender: &'life1 DidKeyPair,
recipient: &'life2 Did,
permission: Permission,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_did_msgs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
recipient: (&'life1 Did, &'life2 SecretKey),
timestamp: DateTime,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Did, Permission)>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl Freeze for DwnClient
impl !RefUnwindSafe for DwnClient
impl Send for DwnClient
impl Sync for DwnClient
impl Unpin for DwnClient
impl !UnwindSafe for DwnClient
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)