pub struct Replacement {
pub offset: usize,
pub length: usize,
pub value: Option<String>,
pub line: usize,
pub cols: 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: 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: 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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more