Trait libpijul::pristine::ChannelMutTxnT
source · [−]pub trait ChannelMutTxnT: ChannelTxnT + GraphMutTxnT {
fn graph_mut(channel: &mut Self::Channel) -> &mut Self::Graph;
fn touch_channel(&mut self, channel: &mut Self::Channel, t: Option<u64>);
fn put_changes(
&mut self,
channel: &mut Self::Channel,
p: ChangeId,
t: ApplyTimestamp,
h: &Hash
) -> Result<Option<Merkle>, TxnErr<Self::GraphError>>;
fn del_changes(
&mut self,
channel: &mut Self::Channel,
p: ChangeId,
t: ApplyTimestamp
) -> Result<bool, TxnErr<Self::GraphError>>;
fn put_tags(
&mut self,
channel: &mut Self::Tags,
n: u64,
m: &Merkle
) -> Result<(), TxnErr<Self::GraphError>>;
fn tags_mut<'a>(
&mut self,
channel: &'a mut Self::Channel
) -> &'a mut Self::Tags;
fn del_tags(
&mut self,
channel: &mut Self::Tags,
n: u64
) -> Result<(), TxnErr<Self::GraphError>>;
}
Required methods
fn touch_channel(&mut self, channel: &mut Self::Channel, t: Option<u64>)
fn put_changes(
&mut self,
channel: &mut Self::Channel,
p: ChangeId,
t: ApplyTimestamp,
h: &Hash
) -> Result<Option<Merkle>, TxnErr<Self::GraphError>>
fn put_changes(
&mut self,
channel: &mut Self::Channel,
p: ChangeId,
t: ApplyTimestamp,
h: &Hash
) -> Result<Option<Merkle>, TxnErr<Self::GraphError>>
Add a change and a timestamp to a change table. Returns None
if and only if (p, t)
was already in the change table, in which case no insertion happened. Returns the new state else.
fn del_changes(
&mut self,
channel: &mut Self::Channel,
p: ChangeId,
t: ApplyTimestamp
) -> Result<bool, TxnErr<Self::GraphError>>
fn del_changes(
&mut self,
channel: &mut Self::Channel,
p: ChangeId,
t: ApplyTimestamp
) -> Result<bool, TxnErr<Self::GraphError>>
Delete a change from a change table. Returns true
if and only if (p, t)
was in the change table.