pub struct NativeObjectPayload {
pub schema_version: u16,
pub object_format: String,
pub metadata_digest: Digest,
pub object_digest: Digest,
pub metadata: Vec<u8>,
pub object: Vec<u8>,
}Fields§
§schema_version: u16§object_format: String§metadata_digest: Digest§object_digest: Digest§metadata: Vec<u8>§object: Vec<u8>Implementations§
Source§impl NativeObjectPayload
impl NativeObjectPayload
pub fn new( object_format: impl Into<String>, metadata: Vec<u8>, object: Vec<u8>, ) -> ArtifactResult<Self>
pub fn validate(&self) -> ArtifactResult<()>
pub fn to_canonical_bytes(&self) -> ArtifactResult<Vec<u8>>
pub fn from_canonical_bytes(bytes: &[u8]) -> ArtifactResult<Self>
Trait Implementations§
Source§impl Clone for NativeObjectPayload
impl Clone for NativeObjectPayload
Source§fn clone(&self) -> NativeObjectPayload
fn clone(&self) -> NativeObjectPayload
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NativeObjectPayload
impl Debug for NativeObjectPayload
Source§impl<'de> Deserialize<'de> for NativeObjectPayload
impl<'de> Deserialize<'de> for NativeObjectPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NativeObjectPayload
Source§impl PartialEq for NativeObjectPayload
impl PartialEq for NativeObjectPayload
Source§impl Serialize for NativeObjectPayload
impl Serialize for NativeObjectPayload
impl StructuralPartialEq for NativeObjectPayload
Auto Trait Implementations§
impl Freeze for NativeObjectPayload
impl RefUnwindSafe for NativeObjectPayload
impl Send for NativeObjectPayload
impl Sync for NativeObjectPayload
impl Unpin for NativeObjectPayload
impl UnsafeUnpin for NativeObjectPayload
impl UnwindSafe for NativeObjectPayload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.