[−][src]Trait libpijul::pristine::MutTxnT
The trait of immutable transactions.
Required methods
fn open_or_create_channel(
&mut self,
name: &str
) -> Result<ChannelRef<Self>, Self::GraphError>
[src]
&mut self,
name: &str
) -> Result<ChannelRef<Self>, Self::GraphError>
Open a channel, creating it if it is missing. The return type
is a Rc<RefCell<…>>
in order to avoid:
- opening the same channel twice. Since a channel contains pointers, that could potentially lead to double-borrow issues. We absolutely have to check that at runtime (hence the
RefCell
). - writing the channel to disk (if the backend is written on the disk) for every minor operation on the channel.
Additionally, the Rc
is used to:
- avoid having to commit channels explicitly (channels are committed automatically upon committing the transaction), and
- to return a value that doesn't borrow the transaction, so that the channel can actually be used in a mutable transaction.
fn fork(
&mut self,
channel: &ChannelRef<Self>,
name: &str
) -> Result<ChannelRef<Self>, ForkError<Self::GraphError>>
[src]
&mut self,
channel: &ChannelRef<Self>,
name: &str
) -> Result<ChannelRef<Self>, ForkError<Self::GraphError>>
fn rename_channel(
&mut self,
channel: &mut ChannelRef<Self>,
name: &str
) -> Result<(), ForkError<Self::GraphError>>
[src]
&mut self,
channel: &mut ChannelRef<Self>,
name: &str
) -> Result<(), ForkError<Self::GraphError>>
fn drop_channel(&mut self, name: &str) -> Result<bool, Self::GraphError>
[src]
fn commit(self) -> Result<(), Self::GraphError>
[src]
Commit this transaction.
fn open_or_create_remote(
&mut self,
name: &str
) -> Result<RemoteRef<Self>, Self::GraphError>
[src]
&mut self,
name: &str
) -> Result<RemoteRef<Self>, Self::GraphError>
fn put_remote(
&mut self,
remote: &mut RemoteRef<Self>,
k: u64,
v: (Hash, Merkle)
) -> Result<bool, Self::GraphError>
[src]
&mut self,
remote: &mut RemoteRef<Self>,
k: u64,
v: (Hash, Merkle)
) -> Result<bool, Self::GraphError>
fn del_remote(
&mut self,
remote: &mut RemoteRef<Self>,
k: u64
) -> Result<bool, Self::GraphError>
[src]
&mut self,
remote: &mut RemoteRef<Self>,
k: u64
) -> Result<bool, Self::GraphError>
fn drop_remote(
&mut self,
remote: RemoteRef<Self>
) -> Result<bool, Self::GraphError>
[src]
&mut self,
remote: RemoteRef<Self>
) -> Result<bool, Self::GraphError>
fn drop_named_remote(&mut self, remote: &str) -> Result<bool, Self::GraphError>
[src]
Implementors
impl MutTxnT for MutTxn<()>
[src]
fn put_remote(
&mut self,
remote: &mut RemoteRef<Self>,
k: u64,
v: (Hash, Merkle)
) -> Result<bool, Self::GraphError>
[src]
&mut self,
remote: &mut RemoteRef<Self>,
k: u64,
v: (Hash, Merkle)
) -> Result<bool, Self::GraphError>
fn del_remote(
&mut self,
remote: &mut RemoteRef<Self>,
k: u64
) -> Result<bool, Self::GraphError>
[src]
&mut self,
remote: &mut RemoteRef<Self>,
k: u64
) -> Result<bool, Self::GraphError>
fn open_or_create_channel(
&mut self,
name: &str
) -> Result<ChannelRef<Self>, Self::GraphError>
[src]
&mut self,
name: &str
) -> Result<ChannelRef<Self>, Self::GraphError>
fn fork(
&mut self,
channel: &ChannelRef<Self>,
new_name: &str
) -> Result<ChannelRef<Self>, ForkError<Self::GraphError>>
[src]
&mut self,
channel: &ChannelRef<Self>,
new_name: &str
) -> Result<ChannelRef<Self>, ForkError<Self::GraphError>>
fn rename_channel(
&mut self,
channel: &mut ChannelRef<Self>,
new_name: &str
) -> Result<(), ForkError<Self::GraphError>>
[src]
&mut self,
channel: &mut ChannelRef<Self>,
new_name: &str
) -> Result<(), ForkError<Self::GraphError>>
fn drop_channel(&mut self, name: &str) -> Result<bool, Self::GraphError>
[src]
fn open_or_create_remote(
&mut self,
name: &str
) -> Result<RemoteRef<Self>, Self::GraphError>
[src]
&mut self,
name: &str
) -> Result<RemoteRef<Self>, Self::GraphError>
fn drop_remote(
&mut self,
remote: RemoteRef<Self>
) -> Result<bool, Self::GraphError>
[src]
&mut self,
remote: RemoteRef<Self>
) -> Result<bool, Self::GraphError>