pub enum BreakingChange {
Rename {
from: String,
to: String,
},
Retype {
field: String,
from: String,
to: String,
},
Drop {
field: String,
},
RequiredAdd {
field: String,
},
}Expand description
One reason why a candidate schema is not an additive successor of
the previous version. Used inside SchemaError::BreakingChange.
Variants§
Rename
A field present in the previous version disappeared, and a new field of the same declared type appeared in the candidate. Treated as a rename rather than two separate changes because the caller almost certainly meant to rename — the error message tells them which pair we paired up.
Retype
A field changed declared type.
Drop
A previously declared field is gone in the candidate.
RequiredAdd
A field that was previously optional became required, or a new
field appeared in the candidate’s required list (existing
rows wouldn’t carry it).
Implementations§
Trait Implementations§
Source§impl Clone for BreakingChange
impl Clone for BreakingChange
Source§fn clone(&self) -> BreakingChange
fn clone(&self) -> BreakingChange
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 BreakingChange
impl Debug for BreakingChange
Source§impl PartialEq for BreakingChange
impl PartialEq for BreakingChange
Source§fn eq(&self, other: &BreakingChange) -> bool
fn eq(&self, other: &BreakingChange) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BreakingChange
Auto Trait Implementations§
impl Freeze for BreakingChange
impl RefUnwindSafe for BreakingChange
impl Send for BreakingChange
impl Sync for BreakingChange
impl Unpin for BreakingChange
impl UnsafeUnpin for BreakingChange
impl UnwindSafe for BreakingChange
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request