Derive Macro ockam_core::AsyncTryClone

source ·
#[derive(AsyncTryClone)]
{
    // Attributes available to this derive:
    #[async_try_clone]
}
Expand description

Implements the AsyncTryClone trait for a type.

The macro supports the following attributes:

  • #[async_try_clone(crate = "...")]: specify a path to the crate that will be used to import the items required by the macro. This can be helpful when using the macro from an internal ockam crate. Defaults to ockam.

Example of use:

#[derive(ockam::AsyncTryClone)]
#[async_try_clone(crate = "ockam")]
pub struct MyStruct {
    a: u32,
}