pub enum OnConflictMode {
Error,
Merge,
Version,
}Expand description
v0.7.0 multi-agent literal-sweep (scanner B finding F-B3.x) —
re-export the canonical on-conflict enum so external consumers
(HTTP handler at src/handlers/create.rs) can route through
OnConflictMode::parse as a single SSOT instead of carrying
their own inline string-allowlist match for the closed set
error | merge | version.
Re-export of the canonical OnConflict enum (formerly pub(super))
so external consumers — most notably the HTTP handler at
src/handlers/create.rs — can route through the single
OnConflict::parse SSOT instead of carrying duplicated string
allowlist matches. Multi-agent sweep ref: scanner B finding F-B3.x.
v0.6.3.1 P2 (G6) — on_conflict modes for memory_store.
Error— refuse the write with a typed CONFLICT error. This is the new default for v2-aware clients.Merge— keep the v0.6.3 silent-merge upsert behaviour. Default for v1 / unknown clients to preserve backward compatibility.Version— auto-suffix the title with(2),(3), … to write a distinct row.
Variants§
Implementations§
Source§impl OnConflict
impl OnConflict
Sourcepub fn parse(s: &str) -> Result<Self, String>
pub fn parse(s: &str) -> Result<Self, String>
§Errors
Returns the wire-compatible "invalid on_conflict '...'..."
error string surfaced to MCP callers when an unknown value
appears in the params.
v0.7.0 (multi-agent literal-sweep scanner B finding F-B3.x):
promoted from pub(super) to pub so the HTTP handler
(src/handlers/create.rs) can reuse this single parse path
instead of the prior duplicated matches!(... "error" | "merge" | "version") + per-mode dispatch. Single SSOT for the on-
conflict closed set.
Trait Implementations§
Source§impl Clone for OnConflict
impl Clone for OnConflict
Source§fn clone(&self) -> OnConflict
fn clone(&self) -> OnConflict
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OnConflict
Source§impl Debug for OnConflict
impl Debug for OnConflict
impl Eq for OnConflict
Source§impl PartialEq for OnConflict
impl PartialEq for OnConflict
Source§fn eq(&self, other: &OnConflict) -> bool
fn eq(&self, other: &OnConflict) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OnConflict
Auto Trait Implementations§
impl Freeze for OnConflict
impl RefUnwindSafe for OnConflict
impl Send for OnConflict
impl Sync for OnConflict
impl Unpin for OnConflict
impl UnsafeUnpin for OnConflict
impl UnwindSafe for OnConflict
Blanket Implementations§
impl<T> Boilerplate for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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