[][src]Trait libpijul::changestore::ChangeStore

pub trait ChangeStore {
    pub fn has_contents(&self, hash: Hash, change_id: Option<ChangeId>) -> bool;
pub fn get_contents<F: Fn(ChangeId) -> Option<Hash>>(
        &self,
        hash: F,
        key: Vertex<ChangeId>,
        buf: &mut Vec<u8>
    ) -> Result<usize, Error>;
pub fn get_contents_ext(
        &self,
        key: Vertex<Option<Hash>>,
        buf: &mut Vec<u8>
    ) -> Result<usize, Error>;
pub fn change_deletes_position<F: Fn(ChangeId) -> Option<Hash>>(
        &self,
        hash: F,
        change: ChangeId,
        pos: Position<Option<Hash>>
    ) -> Result<Vec<Hash>, Error>;
pub fn save_change(&self, p: &Change) -> Result<Hash, Error>;
pub fn del_change(&self, h: &Hash) -> Result<bool, Error>;
pub fn get_change(&self, h: &Hash) -> Result<Change, Error>; pub fn get_header(&self, h: &Hash) -> Result<ChangeHeader, Error> { ... }
pub fn get_dependencies(&self, hash: &Hash) -> Result<Vec<Hash>, Error> { ... }
pub fn get_extra_known(&self, hash: &Hash) -> Result<Vec<Hash>, Error> { ... }
pub fn knows(&self, hash0: &Hash, hash1: &Hash) -> Result<bool, Error> { ... }
pub fn has_edge(
        &self,
        change: Hash,
        from: Position<Option<Hash>>,
        to: Position<Option<Hash>>,
        flags: EdgeFlags
    ) -> Result<bool, Error> { ... }
pub fn get_file_name<'a, F: Fn(ChangeId) -> Option<Hash>>(
        &self,
        hash: F,
        vertex: Vertex<ChangeId>,
        buf: &'a mut Vec<u8>
    ) -> Result<(InodeMetadata, &'a str), Error> { ... } }

A trait for storing changes and reading from them.

Required methods

pub fn has_contents(&self, hash: Hash, change_id: Option<ChangeId>) -> bool[src]

pub fn get_contents<F: Fn(ChangeId) -> Option<Hash>>(
    &self,
    hash: F,
    key: Vertex<ChangeId>,
    buf: &mut Vec<u8>
) -> Result<usize, Error>
[src]

pub fn get_contents_ext(
    &self,
    key: Vertex<Option<Hash>>,
    buf: &mut Vec<u8>
) -> Result<usize, Error>
[src]

pub fn change_deletes_position<F: Fn(ChangeId) -> Option<Hash>>(
    &self,
    hash: F,
    change: ChangeId,
    pos: Position<Option<Hash>>
) -> Result<Vec<Hash>, Error>
[src]

pub fn save_change(&self, p: &Change) -> Result<Hash, Error>[src]

pub fn del_change(&self, h: &Hash) -> Result<bool, Error>[src]

pub fn get_change(&self, h: &Hash) -> Result<Change, Error>[src]

Loading content...

Provided methods

pub fn get_header(&self, h: &Hash) -> Result<ChangeHeader, Error>[src]

pub fn get_dependencies(&self, hash: &Hash) -> Result<Vec<Hash>, Error>[src]

pub fn get_extra_known(&self, hash: &Hash) -> Result<Vec<Hash>, Error>[src]

pub fn knows(&self, hash0: &Hash, hash1: &Hash) -> Result<bool, Error>[src]

pub fn has_edge(
    &self,
    change: Hash,
    from: Position<Option<Hash>>,
    to: Position<Option<Hash>>,
    flags: EdgeFlags
) -> Result<bool, Error>
[src]

pub fn get_file_name<'a, F: Fn(ChangeId) -> Option<Hash>>(
    &self,
    hash: F,
    vertex: Vertex<ChangeId>,
    buf: &'a mut Vec<u8>
) -> Result<(InodeMetadata, &'a str), Error>
[src]

Loading content...

Implementors

impl ChangeStore for FileSystem[src]

impl ChangeStore for Memory[src]

Loading content...