Struct tuf::repository::HttpRepository [] [src]

pub struct HttpRepository<D> where
    D: DataInterchange
{ /* fields omitted */ }

A repository accessible over HTTP.

Methods

impl<D> HttpRepository<D> where
    D: DataInterchange
[src]

[src]

Create a new repository with the given Url and Client.

Callers should include a custom User-Agent prefix to help maintainers of TUF repositories keep track of which client versions exist in the field.

The argument metadata_prefix is used provide an alternate path where metadata is stored on the repository. If None, this defaults to /. For example, if there is a TUF repository at https://tuf.example.com/, but all metadata is stored at /meta/, then passing the arg Some("meta".into()) would cause root.json to be fetched from https://tuf.example.com/meta/root.json.

Trait Implementations

impl<D> Repository<D> for HttpRepository<D> where
    D: DataInterchange
[src]

The type returned when reading a target.

[src]

Initialize the repository.

[src]

This always returns Err as storing over HTTP is not yet supported.

[src]

Fetch signed metadata.

[src]

This always returns Err as storing over HTTP is not yet supported.

[src]

Fetch the given target.

[src]

Perform a sanity check that M, Role, and MetadataPath all desrcribe the same entity.