Struct loro_internal::txn::Transaction
source · pub struct Transaction { /* private fields */ }Implementations§
source§impl Transaction
impl Transaction
pub fn new( state: Arc<Mutex<DocState>>, oplog: Arc<Mutex<OpLog>>, global_txn: Weak<Mutex<Option<Transaction>>> ) -> Self
pub fn new_with_origin( state: Arc<Mutex<DocState>>, oplog: Arc<Mutex<OpLog>>, origin: InternalString, global_txn: Weak<Mutex<Option<Transaction>>> ) -> Self
pub fn set_origin(&mut self, origin: InternalString)
pub fn commit(self) -> Result<(), LoroError>
pub fn set_timestamp(&mut self, time: Timestamp)
sourcepub fn get_text<I: IntoContainerId>(&self, id: I) -> TextHandler
pub fn get_text<I: IntoContainerId>(&self, id: I) -> TextHandler
id can be a str, ContainerID, or ContainerIdRaw. if it’s str it will use Root container, which will not be None
sourcepub fn get_list<I: IntoContainerId>(&self, id: I) -> ListHandler
pub fn get_list<I: IntoContainerId>(&self, id: I) -> ListHandler
id can be a str, ContainerID, or ContainerIdRaw. if it’s str it will use Root container, which will not be None
sourcepub fn get_map<I: IntoContainerId>(&self, id: I) -> MapHandler
pub fn get_map<I: IntoContainerId>(&self, id: I) -> MapHandler
id can be a str, ContainerID, or ContainerIdRaw. if it’s str it will use Root container, which will not be None
sourcepub fn get_tree<I: IntoContainerId>(&self, id: I) -> TreeHandler
pub fn get_tree<I: IntoContainerId>(&self, id: I) -> TreeHandler
id can be a str, ContainerID, or ContainerIdRaw. if it’s str it will use Root container, which will not be None
pub fn get_value_by_idx(&self, idx: ContainerIdx) -> LoroValue
pub fn next_id(&self) -> ID
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Transaction
impl !RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl !UnwindSafe for Transaction
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more