Struct cpp_linter::clang_tools::clang_format::Replacement
source · pub struct Replacement {
pub offset: usize,
pub length: usize,
pub value: Option<String>,
pub line: Option<usize>,
pub cols: Option<usize>,
}
Expand description
A single replacement that clang-format wants to make.
Fields§
§offset: usize
The byte offset where the replacement will start.
length: usize
The amount of bytes that will be removed.
value: Option<String>
The bytes (UTF-8 encoded) that will be added at the Replacement::offset
position.
line: Option<usize>
The line number described by the Replacement::offset
.
This value is not provided by the XML output, but we calculate it after deserialization.
cols: Option<usize>
The column number on the line described by the Replacement::offset
.
This value is not provided by the XML output, but we calculate it after deserialization.
Trait Implementations§
source§impl Clone for Replacement
impl Clone for Replacement
source§impl Debug for Replacement
impl Debug for Replacement
source§impl<'de> Deserialize<'de> for Replacement
impl<'de> Deserialize<'de> for Replacement
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 Replacement
impl PartialEq for Replacement
impl StructuralPartialEq for Replacement
Auto Trait Implementations§
impl Freeze for Replacement
impl RefUnwindSafe for Replacement
impl Send for Replacement
impl Sync for Replacement
impl Unpin for Replacement
impl UnwindSafe for Replacement
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)