pub enum ReadForFix {
Bytes(Vec<u8>),
Skipped(FixOutcome),
}Expand description
Result of read_for_fix — either the bytes of the file,
or a FixOutcome::Skipped the caller should return.
Content-editing fixers (file_prepend, file_append,
file_trim_trailing_whitespace, …) funnel their initial read
through this helper so the fix_size_limit guard is enforced
uniformly: over-limit files are reported as Skipped with a
clear reason, and a one-line warning is printed to stderr so
scripted runs notice.
Variants§
Bytes(Vec<u8>)
Skipped(FixOutcome)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReadForFix
impl RefUnwindSafe for ReadForFix
impl Send for ReadForFix
impl Sync for ReadForFix
impl Unpin for ReadForFix
impl UnsafeUnpin for ReadForFix
impl UnwindSafe for ReadForFix
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> 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