There was an error while loading. Please reload this page.
1 parent f8f956f commit 1982227Copy full SHA for 1982227
rust/cbork-utils/src/with_cbor_bytes.rs
@@ -23,6 +23,9 @@ impl<T> Deref for WithCborBytes<T> {
23
impl<T> WithCborBytes<T> {
24
/// Creates a new instance of the `WithCborBytes` from the provided `obj` by encoding
25
/// it and storing resulted `cbor_bytes`.
26
+ ///
27
+ /// # Errors
28
+ /// - Infallible
29
pub fn new<C>(obj: T, ctx: &mut C) -> Result<Self, minicbor::encode::Error<Infallible>>
30
where T: minicbor::Encode<C> {
31
let cbor_bytes = minicbor::to_vec_with(&obj, ctx)?;
0 commit comments