Rust Client library to interact with Supabase Storage.
WARNING: This script is not ready for production use. |
To install simple run the following command:
cargo add storage-supabase
or add the following to your Cargo.toml
file:
[dependencies]
storage-supabase = "0.1.0"
Add use statement to your code:
use storage_supabase::StorageClient;
Then that's it! You can now use the StorageClient
to interact with Supabase Storage.
Here is an example of how to list all the buckets in your Supabase Storage asynchronously:
let client = StorageClient::new("https://<your_project_id>.supabase.co", "<your_anon_key>");
let bucket = client.list_buckets_async().await;
match bucket {
Ok(buckets) => {
println!("Buckets: {:?}", buckets);
},
Err(e) => {
println!("Error: {:?}", e);
}
}