Struct Transaction
pub struct Transaction(/* private fields */);Expand description
An open transaction, as NeoForge’s TransactionContext: what every write of a handler or a
place takes. host.transaction gets one from the game and lends it to its closure alone.
It lets its holder write in the transaction, not end it: ending one takes its
TransactionSeal, which only whoever opened it holds. The authority is the game’s, not
this value’s: it names one transaction the game opened by a token that cannot be guessed in
practice (a randomly keyed 64-bit hash), and the game checks it on every write. A write
given a transaction that is not open changes nothing, so a value decoded from bytes or kept
past its closure cannot write outside the journal.
Trait Implementations§
§impl Debug for Transaction
impl Debug for Transaction
impl Eq for Transaction
§impl PartialEq for Transaction
impl PartialEq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnsafeUnpin 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