Skip to main content

RepoFile

Trait RepoFile 

Source
pub trait RepoFile:
    Serialize
    + DeserializeOwned
    + Sized
    + Send
    + Sync
    + 'static {
    type Id: RepoId;

    const TYPE: FileType;
    const ENCRYPTED: bool = true;
}
Expand description

Marker trait for repository files which are stored as JSON

Required Associated Constants§

Source

const TYPE: FileType

The FileType associated with the repository file

Provided Associated Constants§

Source

const ENCRYPTED: bool = true

Indicate whether the files are stored encrypted

Required Associated Types§

Source

type Id: RepoId

The Id type associated with the repository file

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl RepoFile for ConfigFile

Source§

const TYPE: FileType = FileType::Config

Source§

type Id = ConfigId

Source§

impl RepoFile for IndexFile

Source§

const TYPE: FileType = FileType::Index

Source§

type Id = IndexId

Source§

impl RepoFile for KeyFile

Source§

const TYPE: FileType = FileType::Key

Source§

const ENCRYPTED: bool = false

Source§

type Id = KeyId

Source§

impl RepoFile for SnapshotFile

Source§

const TYPE: FileType = FileType::Snapshot

Source§

type Id = SnapshotId