diff --git a/crates/dwn/src/actor/mod.rs b/crates/dwn/src/actor/mod.rs index 02407d2..967e178 100644 --- a/crates/dwn/src/actor/mod.rs +++ b/crates/dwn/src/actor/mod.rs @@ -41,6 +41,7 @@ use self::{ /// Identity actor. /// Holds a DID and associated keys. /// Provides methods for interacting with the DID's DWN. +#[derive(Clone)] pub struct Actor { pub attestation: VerifiableCredential, pub authorization: VerifiableCredential, diff --git a/crates/dwn/src/actor/remote.rs b/crates/dwn/src/actor/remote.rs index 185b03a..2e5b720 100644 --- a/crates/dwn/src/actor/remote.rs +++ b/crates/dwn/src/actor/remote.rs @@ -8,6 +8,13 @@ pub struct Remote { url: String, } +impl Clone for Remote { + fn clone(&self) -> Self { + let capacity = self.sender.capacity(); + Self::new_with_capacity(self.url.clone(), capacity) + } +} + impl Remote { /// Create a new remote with a message queue size of 100. pub fn new(url: String) -> Self {