pub struct AtomicRequest {
pub operations: Vec<AtomicOperation>,
}Expand description
Request envelope carrying an ordered list of atomic operations.
Wire form: {"atomic:operations": [...]}. Execution order is significant —
later operations may reference lid values introduced by earlier add ops.
Fields§
§operations: Vec<AtomicOperation>Ordered list of operations to execute atomically.
The array must be present on the wire; an absent atomic:operations
key is a deserialization error.
Implementations§
Source§impl AtomicRequest
impl AtomicRequest
Sourcepub fn validate_lid_refs(&self) -> Result<()>
pub fn validate_lid_refs(&self) -> Result<()>
Check that every lid referenced by an operation is introduced by a
strictly earlier add operation, that no lid is introduced twice,
and that no operation targets both ref and href.
Returns Error::InvalidAtomicOperation at the first offending index.
Serialization and deserialization of AtomicRequest remain infallible
with respect to lid semantics; pre-flight validation is opt-in.
Trait Implementations§
Source§impl Clone for AtomicRequest
impl Clone for AtomicRequest
Source§fn clone(&self) -> AtomicRequest
fn clone(&self) -> AtomicRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AtomicRequest
impl Debug for AtomicRequest
Source§impl Default for AtomicRequest
impl Default for AtomicRequest
Source§fn default() -> AtomicRequest
fn default() -> AtomicRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AtomicRequest
impl<'de> Deserialize<'de> for AtomicRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AtomicRequest
impl PartialEq for AtomicRequest
Source§impl Serialize for AtomicRequest
impl Serialize for AtomicRequest
impl StructuralPartialEq for AtomicRequest
Auto Trait Implementations§
impl Freeze for AtomicRequest
impl RefUnwindSafe for AtomicRequest
impl Send for AtomicRequest
impl Sync for AtomicRequest
impl Unpin for AtomicRequest
impl UnsafeUnpin for AtomicRequest
impl UnwindSafe for AtomicRequest
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