Skip to main content

Module client

Module client 

Source
Expand description

Clients for high level interactions with TUF repositories.

§Example

let root_public_keys = load_root_public_keys();
let local = FileSystemRepository::<Pouf1>::new(PathBuf::from("~/.rustup"));

let remote = HttpRepositoryBuilder::new_with_uri(
    "https://static.rust-lang.org/".parse::<http::Uri>().unwrap(),
    HttpClient::new(),
)
.user_agent("rustup/1.4.0")
.build();

let mut client = Client::with_trusted_root_keys(
    Config::default(),
    MetadataVersion::Number(1),
    1,
    &root_public_keys,
    local,
    remote,
).await?;

let _ = client.update().await?;

Structs§

Client
A client that interacts with TUF repositories.
Config
Configuration for a TUF Client.
ConfigBuilder
Helper for building and validating a TUF client Config.
Parts
Deconstructed parts of a Client.