Details
Details
Test code
let client = BlobServiceClient::new("http://localhost:50053".parse()?); let blob_hash = "hello".to_string(); let holder = "world".to_string(); let stream = async_stream::stream! { yield Result::<Vec<u8>, std::io::Error>::Ok(vec![1, 2, 3]); yield Ok(vec![4, 5, 6]); yield Err(std::io::Error::new(std::io::ErrorKind::Other, "test")); }; client.assign_holder(&blob_hash, &holder).await?; client.upload_blob(&blob_hash, stream).await.map_err(|e| { println!("Error: {0:?} --- {0}", e); e })?; let mut stream = client.get("hello").await?; while let Some(data) = stream.try_next().await? { println!("Got data: {:?}", data); } client.revoke_holder(&blob_hash, &holder).await?;
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable