#[non_exhaustive]pub enum StatementEdit<'a> {
Insert(&'a [Value]),
Replace(&'a Value),
Delete,
}Expand description
One edit against a rule statement list, addressed by
StatementAddress. The payload nodes are rule-content-v1 statement
documents — {"value": …} for conditions, {"call": id, "args": […]}
for actions — converted through
statement_from_content.
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.
Insert(&'a [Value])
Insert a non-empty list of statements before index
(index == list.len() appends at the end of the section).
Replace(&'a Value)
Replace exactly the statement at index, keeping its leading
comments.
Delete
Delete the statement at index together with its comments.
Trait Implementations§
Source§impl<'a> Clone for StatementEdit<'a>
impl<'a> Clone for StatementEdit<'a>
impl<'a> Copy for StatementEdit<'a>
Auto Trait Implementations§
impl<'a> Freeze for StatementEdit<'a>
impl<'a> RefUnwindSafe for StatementEdit<'a>
impl<'a> Send for StatementEdit<'a>
impl<'a> Sync for StatementEdit<'a>
impl<'a> Unpin for StatementEdit<'a>
impl<'a> UnsafeUnpin for StatementEdit<'a>
impl<'a> UnwindSafe for StatementEdit<'a>
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