/// Creates and seals an object in the object store. This is an optimization which allows
/// small objects to be created quickly with fewer messages to the store.
/// * `oid` The ID for the object to create.
/// * `data` The data for the object to create.
/// * `meta` The metadata for the object to create.
Creates and seals an object in the object store. This is an optimization which allows
small objects to be created quickly with fewer messages to the store.
`oid` The ID for the object to create.
`data` The data for the object to create.
`meta` The metadata for the object to create.
Creates and seals an object in the object store . This is an optimization which allows small objects to be created quickly with fewer messages to the store . ` oid ` The ID for the object to create . ` data ` The data for the object to create . ` meta ` The metadata for the object to create .
pub fn create_and_seal(
        &self,
        oid: ObjectId,
        data: &[u8],
        meta: &[u8],
    ) -> Result<(), PlasmaError> {
        let status =
            plasma::create_and_seal(self.client_ptr.as_ref().unwrap(), oid.inner(), data, meta);
        match status.code {
            plasma::StatusCode::OK => Ok(()),
            plasma::StatusCode::AlreadyExists => Err(PlasmaError::AlreadyExists),
            _ => Err(PlasmaError::UnknownError(status.msg)),
        }
    }
pub fn create_and_seal ( & self , oid : ObjectId , data : & [ u8 ] , meta : & [ u8 ] , ) -> Result < ( ) , PlasmaError > { let status = plasma :: create_and_seal ( self . client_ptr . as_ref ( ) . unwrap ( ) , oid . inner ( ) , data , meta ) ; match status . code { plasma :: StatusCode :: OK => Ok ( ( ) ) , plasma :: StatusCode :: AlreadyExists => Err ( PlasmaError :: AlreadyExists ) , _ => Err ( PlasmaError :: UnknownError ( status . msg ) ) , } }
Creates and seals an object in the object store.
Creates and seals an object in the object store .
&self
oid
ObjectId
data
&[u8]
meta
&[u8]