MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / version_mismatch

Method version_mismatch

atomic-remote/src/error.rs:279–289  ·  view source on GitHub ↗

Create a version mismatch error. `client_version` is the running CLI version; `server_version` is the value of the `X-Atomic-Min-Version` response header if present; `cause` is the low-level decode error string kept for diagnostic context.

(
        client_version: impl Into<String>,
        server_version: Option<impl Into<String>>,
        cause: impl Into<String>,
    )

Source from the content-addressed store, hash-verified

277 /// value of the `X-Atomic-Min-Version` response header if present;
278 /// `cause` is the low-level decode error string kept for diagnostic context.
279 pub fn version_mismatch(
280 client_version: impl Into<String>,
281 server_version: Option<impl Into<String>>,
282 cause: impl Into<String>,
283 ) -> Self {
284 Self::VersionMismatch {
285 client_version: client_version.into(),
286 server_version: server_version.map(Into::into),
287 cause: cause.into(),
288 }
289 }
290
291 /// Create a generic error.
292 pub fn other(message: impl Into<String>) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected