async fn store_transaction_proto(
    object_store: &ObjectStore,
    path: &Path,
    proto: &proto::Transaction,
) -> Result<()> {
    let mut data = Vec::new();
    proto.encode(&mut data).context(Serialization {})?;
    let data = Bytes::from(data);
    let len = data.len();

    object_store
        .put(
            &path,
            futures::stream::once(async move { Ok(data) }),
            Some(len),
        )
        .await
        .context(Write {})?;

    Ok(())
}
/// Serialize and store protobuf-encoded transaction.
Serialize and store protobuf-encoded transaction.
Serialize and store protobuf - encoded transaction .
async fn store_transaction_proto(
    object_store: &ObjectStore,
    path: &Path,
    proto: &proto::Transaction,
) -> Result<()> {
    let mut data = Vec::new();
    proto.encode(&mut data).context(Serialization {})?;
    let data = Bytes::from(data);
    let len = data.len();
    object_store
        .put(
            &path,
            futures::stream::once(async move { Ok(data) }),
            Some(len),
        )
        .await
        .context(Write {})?;
    Ok(())
}
async fn store_transaction_proto ( object_store : & ObjectStore , path : & Path , proto : & proto :: Transaction , ) -> Result < ( ) > { let mut data = Vec :: new ( ) ; proto . encode ( & mut data ) . context ( Serialization { } ) ? ; let data = Bytes :: from ( data ) ; let len = data . len ( ) ; object_store . put ( & path , futures :: stream :: once ( async move { Ok ( data ) } ) , Some ( len ) , ) . await . context ( Write { } ) ? ; Ok ( ( ) ) }
Serialize and store protobuf-encoded transaction.
Serialize and store protobuf - encoded transaction .
object_store
&ObjectStore
path
&Path
proto
&proto::Transaction
object_store
&ObjectStore
path
&Path
proto
&proto::Transaction