Trait libpijul::pristine::GraphTxnT [−][src]
pub trait GraphTxnT: Sized {
type GraphError: Error + Send + Sync + 'static;
type Graph;
type Adj;
fn get_graph<'txn>(
&'txn self,
db: &Self::Graph,
key: &Vertex<ChangeId>,
value: Option<&SerializedEdge>
) -> Result<Option<&'txn SerializedEdge>, TxnErr<Self::GraphError>>;
fn get_external(
&self,
p: &ChangeId
) -> Result<Option<&SerializedHash>, TxnErr<Self::GraphError>>;
fn get_internal(
&self,
p: &SerializedHash
) -> Result<Option<&ChangeId>, TxnErr<Self::GraphError>>;
fn init_adj(
&self,
g: &Self::Graph,
v: Vertex<ChangeId>,
dest: Position<ChangeId>,
min: EdgeFlags,
max: EdgeFlags
) -> Result<Self::Adj, TxnErr<Self::GraphError>>;
fn next_adj<'a>(
&'a self,
g: &Self::Graph,
a: &mut Self::Adj
) -> Option<Result<&'a SerializedEdge, TxnErr<Self::GraphError>>>;
fn find_block<'a>(
&'a self,
graph: &Self::Graph,
p: Position<ChangeId>
) -> Result<&'a Vertex<ChangeId>, BlockError<Self::GraphError>>;
fn find_block_end<'a>(
&'a self,
graph: &Self::Graph,
p: Position<ChangeId>
) -> Result<&'a Vertex<ChangeId>, BlockError<Self::GraphError>>;
}
Associated Types
Required methods
fn get_graph<'txn>(
&'txn self,
db: &Self::Graph,
key: &Vertex<ChangeId>,
value: Option<&SerializedEdge>
) -> Result<Option<&'txn SerializedEdge>, TxnErr<Self::GraphError>>
fn get_external(
&self,
p: &ChangeId
) -> Result<Option<&SerializedHash>, TxnErr<Self::GraphError>>
fn get_external(
&self,
p: &ChangeId
) -> Result<Option<&SerializedHash>, TxnErr<Self::GraphError>>
Returns the external hash of an internal change identifier, if the change is known.
fn get_internal(
&self,
p: &SerializedHash
) -> Result<Option<&ChangeId>, TxnErr<Self::GraphError>>
fn get_internal(
&self,
p: &SerializedHash
) -> Result<Option<&ChangeId>, TxnErr<Self::GraphError>>
Returns the internal change identifier of change with external
hash hash
, if the change is known.