pub trait Ref {
    fn is_ref(&self) -> Result<bool>;
    fn get_hash(&self) -> Result<&str>;
    fn make_ref<P: AsRef<Path>>(&mut self, hash: String, path: P) -> Result<()>;
    fn get_path(&self) -> Result<PathBuf>;
    fn hash_valid<RPG: UniqueRefPathGenerator>(&self) -> Result<bool>;
    fn remove_ref(&mut self) -> Result<()>;

    fn is_ref_to_file(&self) -> Result<bool> { ... }
    fn is_ref_to_dir(&self) -> Result<bool> { ... }
    fn is_dangling(&self) -> Result<bool> { ... }
}

Required Methods

Check whether the underlying object is actually a ref

Get the stored hash.

Does not need a UniqueRefPathGenerator as it reads the hash stored in the header

Make this object a ref

Get the referenced path.

Does not need a UniqueRefPathGenerator as it reads the path stored in the header.

Check whether the referenced file still matches its hash

Provided Methods

Alias for r.fs_link_exists() && r.deref().is_file()

Alias for r.fs_link_exists() && r.deref().is_dir()

Alias for !Ref::fs_link_exists()

Implementations on Foreign Types

source

impl Ref for Entry

Check whether the underlying object is actually a ref

Implementors