candid icon indicating copy to clipboard operation
candid copied to clipboard

feat: make error clonable

Open nathanosdev opened this issue 1 year ago • 1 comments

Overview This makes candid::Error clonable, which makes it easier for downstream clients to also make their Error types cloneable.

I've made a related PR for agent-rs.

Considered Solutions I can also work around by using Arc<T> in downstream clients.

Considerations This shouldn't have any impact on security or performance. Anyone that was interacting directly with the Custom variant may have a breaking change since it is wrapped in an Arc<T> now.

nathanosdev avatar May 31 '24 13:05 nathanosdev

I agree that making a major bump just for this feature is not worth the effort, so I'm fine with leaving this to sleep and in the meantime I will just to_string() downstream.

nathanosdev avatar Jun 03 '24 08:06 nathanosdev

In addition to the previous discussion, in Rust the errors are not typically clonable. Closing it.

ilbertt avatar Aug 19 '25 08:08 ilbertt