Struct tuf::repository::FileSystemRepository
[−]
[src]
pub struct FileSystemRepository<D> where
D: DataInterchange, { /* fields omitted */ }
A repository contained on the local file system.
Methods
impl<D> FileSystemRepository<D> where
D: DataInterchange,
[src]
D: DataInterchange,
Trait Implementations
impl<D> Repository<D> for FileSystemRepository<D> where
D: DataInterchange,
[src]
D: DataInterchange,
type TargetRead = File
The type returned when reading a target.
fn initialize(&mut self) -> Result<()>
[src]
Initialize the repository.
fn store_metadata<M>(
&mut self,
role: &Role,
meta_path: &MetadataPath,
version: &MetadataVersion,
metadata: &SignedMetadata<D, M>
) -> Result<()> where
M: Metadata,
[src]
&mut self,
role: &Role,
meta_path: &MetadataPath,
version: &MetadataVersion,
metadata: &SignedMetadata<D, M>
) -> Result<()> where
M: Metadata,
Store signed metadata. Read more
fn fetch_metadata<M>(
&mut self,
role: &Role,
meta_path: &MetadataPath,
version: &MetadataVersion,
max_size: &Option<usize>,
min_bytes_per_second: u32,
hash_data: Option<(&HashAlgorithm, HashValue)>
) -> Result<SignedMetadata<D, M>> where
M: Metadata,
[src]
&mut self,
role: &Role,
meta_path: &MetadataPath,
version: &MetadataVersion,
max_size: &Option<usize>,
min_bytes_per_second: u32,
hash_data: Option<(&HashAlgorithm, HashValue)>
) -> Result<SignedMetadata<D, M>> where
M: Metadata,
Fetch signed metadata.
fn store_target<R>(&mut self, read: R, target_path: &TargetPath) -> Result<()> where
R: Read,
[src]
R: Read,
Store the given target.
fn fetch_target(
&mut self,
target_path: &TargetPath,
target_description: &TargetDescription,
min_bytes_per_second: u32
) -> Result<SafeReader<Self::TargetRead>>
[src]
&mut self,
target_path: &TargetPath,
target_description: &TargetDescription,
min_bytes_per_second: u32
) -> Result<SafeReader<Self::TargetRead>>
Fetch the given target.
fn check<M>(role: &Role, meta_path: &MetadataPath) -> Result<()> where
M: Metadata,
[src]
M: Metadata,
Perform a sanity check that M
, Role
, and MetadataPath
all desrcribe the same entity.