pub trait DocumentCborMethodsV0 {
// Required methods
fn from_cbor(
document_cbor: &[u8],
document_id: Option<[u8; 32]>,
owner_id: Option<[u8; 32]>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>
where Self: Sized;
fn to_cbor_value(&self) -> Result<CborValue, ProtocolError>;
fn to_cbor(&self) -> Result<Vec<u8>, ProtocolError>;
}Required Methods§
Sourcefn from_cbor(
document_cbor: &[u8],
document_id: Option<[u8; 32]>,
owner_id: Option<[u8; 32]>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
fn from_cbor(
document_cbor: &[u8],
document_id: Option<[u8; 32]>,
owner_id: Option<[u8; 32]>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
Reads a CBOR-serialized document and creates a Document from it. If Document and Owner IDs are provided, they are used, otherwise they are created.