use daoxide::prelude::*;
fn main() -> daoxide::Result<()> {
let client = DaosClient::builder()
.pool_label("mypool")
.container_label("mycontainer")
.build()?;
let oid = client.alloc_oid(
ObjectType::KvHashed,
ObjectClass::UNKNOWN,
ObjectClassHints::NONE,
)?;
client.put(oid, b"dkey1", b"akey1", b"hello world")?;
let mut buffer = vec![0u8; 1024];
client.get(oid, b"dkey1", b"akey1", &mut buffer[..11])?;
println!("Retrieved: {:?}", String::from_utf8_lossy(&buffer[..11]));
client.delete(oid, Some(b"dkey1"), None, Tx::none())?;
Ok(())
}