pub struct RepoFormats {
pub repo: Option<FormatRegistry>,
pub folder: Option<FormatRegistry>,
pub hash: u64,
/* private fields */
}Expand description
RepoFormats holds the formats layers that the repository supplies: the
repository layer and the layer formats.d.
Fields§
§repo: Option<FormatRegistry>The repository layer, /.sokf/formats.yaml, when the file exists.
folder: Option<FormatRegistry>The layer formats.d on the embedded formats: the files of
/.sokf/formats.d/ merged without precedence, with the types of
/.sokf/formats.yaml that settle a clash of the folder, or None
when the folder holds no file.
hash: u64The hash of every formats file, read in the order of the paths, which changes when a layer changes.
Implementations§
Source§impl RepoFormats
impl RepoFormats
Sourcepub fn effective(&self, embedded: &FormatRegistry) -> FormatRegistry
pub fn effective(&self, embedded: &FormatRegistry) -> FormatRegistry
effective returns the registry through which a name resolves: the
repository layer, then the layer formats.d, then embedded.
Sourcepub fn folder_layer(&self) -> Option<FormatRegistry>
pub fn folder_layer(&self) -> Option<FormatRegistry>
folder_layer returns the entries and the types of the layer
formats.d alone, or None when /.sokf/formats.d/ holds no file.
Trait Implementations§
Source§impl Clone for RepoFormats
impl Clone for RepoFormats
Source§impl Debug for RepoFormats
impl Debug for RepoFormats
Auto Trait Implementations§
impl Forget for RepoFormats
impl Freeze for RepoFormats
impl Move for RepoFormats
impl RefUnwindSafe for RepoFormats
impl Send for RepoFormats
impl Sync for RepoFormats
impl Unpin for RepoFormats
impl UnsafeUnpin for RepoFormats
impl UnwindSafe for RepoFormats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more