Skip to main content

print_resources

Function print_resources 

Source
pub fn print_resources(resources: Vec<Resource>)
Expand description

Prints a list of resources in a formatted table.

This function takes a vector of Resource objects and displays them in a tabular format showing identifiers and paths. Useful for displaying the results of [BBClient::list_beds] or [BBClient::list_bedsets].

§Arguments

  • resources - Vector of resources to display

§Examples

use gtars_bbcache::client::BBClient;
use gtars_bbcache::utils::print_resources;

let mut client = BBClient::builder().finish()?;
let beds = client.list_beds()?;
print_resources(beds);

§Output Format

┌────────────────────────────────┬─────────────────────────┐
│ id                             │ path                    │
├────────────────────────────────┼─────────────────────────┤
│ 6b2e163a1d4319d99bd465c6c78... │ /path/to/cache/6/b/...  │
└────────────────────────────────┴─────────────────────────┘