#[non_exhaustive]pub enum BlockedReason {
RenameCollision,
TargetNotFound,
InvalidPayload,
}Expand description
Why a StructuralOp was TransformOutcome::Blocked.
A Blocked outcome guarantees the input CST is unchanged (FR-003, §I).
#[non_exhaustive] so future block reasons can be added without a breaking
change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RenameCollision
A rename would collide with an existing field/key in the same struct/map.
TargetNotFound
The addressed parent / element could not be located in the document (e.g. an out-of-range index, or a node from a different tree).
InvalidPayload
The op is not valid for the addressed node (e.g. an op that needs a struct applied to a list element, or new payload text that does not parse).
Trait Implementations§
Source§impl Clone for BlockedReason
impl Clone for BlockedReason
Source§fn clone(&self) -> BlockedReason
fn clone(&self) -> BlockedReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BlockedReason
Source§impl Debug for BlockedReason
impl Debug for BlockedReason
impl Eq for BlockedReason
Source§impl Hash for BlockedReason
impl Hash for BlockedReason
Source§impl PartialEq for BlockedReason
impl PartialEq for BlockedReason
impl StructuralPartialEq for BlockedReason
Auto Trait Implementations§
impl Freeze for BlockedReason
impl RefUnwindSafe for BlockedReason
impl Send for BlockedReason
impl Sync for BlockedReason
impl Unpin for BlockedReason
impl UnsafeUnpin for BlockedReason
impl UnwindSafe for BlockedReason
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