> For the complete documentation index, see [llms.txt](https://doc.cess.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.cess.network/developer/cess-sdk/sdk-rust/chain/file_bank/user_bucket_list.md).

# User Bucket List

Returns a list of all buckets created by each user.

```rust
/// Retrieves a list of user buckets associated with the specified account.
/// 
/// # Parameters
/// 
/// - `account`: A reference to a string slice that holds the account identifier.
/// - `block_hash`: An optional parameter specifying a block hash of type `H256`. 
///   If provided, the function will retrieve the user buckets as of the specified block.
/// 
/// # Returns
/// 
/// - `Result<Option<BoundedVec<BoundedVec<u8>>>, Box<dyn std::error::Error>>`: 
///   The function returns a `Result` which on success contains an `Option`:
///   - `Some(BoundedVec<BoundedVec<u8>>)` if the user has associated buckets.
///   - `None` if the user does not have any associated buckets.
///   On failure, it returns an error wrapped in a `Box<dyn std::error::Error>`.
/// 
pub async fn user_bucket_list(
    account: &str,
    block_hash: Option<H256>,
) -> Result<Option<BoundedVec<BoundedVec<u8>>>, Box<dyn std::error::Error>>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.cess.network/developer/cess-sdk/sdk-rust/chain/file_bank/user_bucket_list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
