[][src]Trait libimagentryref::reference::Ref

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

fn is_ref(&self) -> Result<bool>

Check whether the underlying object is actually a ref

fn get_hash(&self) -> Result<&str>

Get the stored hash.

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

fn make_ref<P: AsRef<Path>>(&mut self, hash: String, path: P) -> Result<()>

Make this object a ref

fn get_path(&self) -> Result<PathBuf>

Get the referenced path.

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

fn hash_valid<RPG: UniqueRefPathGenerator>(&self) -> Result<bool>

Check whether the referenced file still matches its hash

fn remove_ref(&mut self) -> Result<()>

Loading content...

Provided methods

fn is_ref_to_file(&self) -> Result<bool>

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

fn is_ref_to_dir(&self) -> Result<bool>

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

fn is_dangling(&self) -> Result<bool>

Alias for !Ref::fs_link_exists()

Loading content...

Implementations on Foreign Types

impl Ref for Entry[src]

fn is_ref(&self) -> Result<bool>[src]

Check whether the underlying object is actually a ref

fn is_ref_to_file(&self) -> Result<bool>[src]

fn is_ref_to_dir(&self) -> Result<bool>[src]

fn is_dangling(&self) -> Result<bool>[src]

Loading content...

Implementors

Loading content...