#[non_exhaustive]pub struct StatementAddress {
pub rule: usize,
pub list: StatementList,
pub index: usize,
}Expand description
The (rule, list, index) address of a statement edit, by position in the
public crate::Rule model — the same order rule-content-v1 exports.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rule: usizeThe rule index in program.rules.
list: StatementListThe statement list inside the rule.
index: usizeThe statement index inside the list. For an insert this is the index
the new statements are placed before; index == list.len() appends.
Implementations§
Source§impl StatementAddress
impl StatementAddress
Sourcepub fn new(rule: usize, list: StatementList, index: usize) -> Self
pub fn new(rule: usize, list: StatementList, index: usize) -> Self
An address by rule index, statement list, and statement index.
Trait Implementations§
Source§impl Clone for StatementAddress
impl Clone for StatementAddress
impl Copy for StatementAddress
Source§impl Debug for StatementAddress
impl Debug for StatementAddress
impl Eq for StatementAddress
Source§impl PartialEq for StatementAddress
impl PartialEq for StatementAddress
impl StructuralPartialEq for StatementAddress
Auto Trait Implementations§
impl Freeze for StatementAddress
impl RefUnwindSafe for StatementAddress
impl Send for StatementAddress
impl Sync for StatementAddress
impl Unpin for StatementAddress
impl UnsafeUnpin for StatementAddress
impl UnwindSafe for StatementAddress
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