pub struct ScalarEdit { /* private fields */ }Expand description
One exact value-scalar replacement in a syntax document.
Implementations§
Source§impl ScalarEdit
impl ScalarEdit
Sourcepub const fn new(span: SourceSpan, replacement: ReplacementScalar) -> Self
pub const fn new(span: SourceSpan, replacement: ReplacementScalar) -> Self
Creates an edit for one exact source span.
Sourcepub const fn span(&self) -> SourceSpan
pub const fn span(&self) -> SourceSpan
Returns the exact scalar span to replace.
Sourcepub const fn replacement(&self) -> &ReplacementScalar
pub const fn replacement(&self) -> &ReplacementScalar
Returns the typed replacement value.
Trait Implementations§
Source§impl Clone for ScalarEdit
impl Clone for ScalarEdit
Source§fn clone(&self) -> ScalarEdit
fn clone(&self) -> ScalarEdit
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 moreSource§impl Debug for ScalarEdit
impl Debug for ScalarEdit
impl Eq for ScalarEdit
Source§impl PartialEq for ScalarEdit
impl PartialEq for ScalarEdit
impl StructuralPartialEq for ScalarEdit
Auto Trait Implementations§
impl Freeze for ScalarEdit
impl RefUnwindSafe for ScalarEdit
impl Send for ScalarEdit
impl Sync for ScalarEdit
impl Unpin for ScalarEdit
impl UnsafeUnpin for ScalarEdit
impl UnwindSafe for ScalarEdit
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