pub enum MoveError {
UnknownSubjectClass {
key: String,
},
DuplicateRoute {
class: String,
},
TargetIsSource {
class: String,
},
UnknownTable {
table: String,
rows: u64,
},
UnroutedClass {
class: String,
rows: u64,
},
StreamMembers {
notes: Vec<StreamMember>,
},
Collisions {
collisions: Vec<Collision>,
},
Sqlite(Error),
}Expand description
Why a move refused, or how it failed.
Variants§
UnknownSubjectClass
A route key that names no subject class.
DuplicateRoute
The same class routed twice. Ambiguous rather than redundant: the two targets may differ, and picking one would be a guess.
TargetIsSource
A route whose target is the source. A no-op written as an instruction is more likely a mistake than an intent.
UnknownTable
A namespace-bearing table holding rows here that this code has no rule for.
The census finds tables; only a reader of the code can say what a move does with one. So a table arriving in a migration after this was written refuses the move by name, rather than letting the subjects around it move and leaving the new table pointing at a namespace nothing else is in.
UnroutedClass
A subject class with rows in the source namespace and no route.
Distinct from a routed class with no rows, which succeeds reporting zero. A host that binds a pack writing nothing needs “routed, nothing there” to be distinguishable from “you forgot this one”.
StreamMembers
Notes the stream schema pins to their namespace.
Four triggers make this absolute: an UPDATE of a member note naming
namespace aborts, the delete aborts, and both writes to the ledger row
abort. So the refusal comes from a read taken before any write, and names
the notes, rather than from a trigger’s abort string from somewhere in
the middle of the transaction.
Fields
notes: Vec<StreamMember>Collisions
Rows that would collide in a target namespace.
Sqlite(Error)
Trait Implementations§
Source§impl Error for MoveError
impl Error for MoveError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for MoveError
impl !UnwindSafe for MoveError
impl Freeze for MoveError
impl Send for MoveError
impl Sync for MoveError
impl Unpin for MoveError
impl UnsafeUnpin for MoveError
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
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> ⓘ
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> ⓘ
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