Lurian
07/14/2024, 8:08 AMrust
let client = SpiceDBClient::new("http://localhost:50051", "randomkey")
.await
.unwrap();
let schema = include_str!("schema.zed");
client.schema_client().write_schema(schema).await.unwrap();
let mut request = client.permission_client().create_relationships();
request.add_relationship::<User, Document>(
RelationshipOperation::Create,
"jeff".to_owned(),
None,
"homework".to_owned(),
DocumentRelation::Writer,
);
https://github.com/Lur1an/spicedb-rust/