Skip to main content

Refusal

Enum Refusal 

Source
#[non_exhaustive]
pub enum Refusal {
Show 22 variants Remix { object: Hash, }, FixedSizeChunking { object: Hash, chunk_size: u32, }, NonCanonicalChunking { object: Hash, detail: &'static str, }, TimestampOverflow { object: Hash, timestamp: u64, }, TagName { object: Hash, }, RefName { name: String, reason: &'static str, }, SchemaVersion { object: Hash, }, Gitlink { object: Hash, path: String, }, TreeEntryName { object: Hash, name: String, }, UnknownTreeMode { object: Hash, mode: String, }, NormalizedModeInFork { object: Hash, mode: String, }, NegativeTimestamp { object: Hash, timestamp: i64, }, Unparsable { object: Hash, detail: String, }, BlobTooLarge { object: Hash, size: u64, }, TooManyTreeEntries { object: Hash, count: usize, }, TreeEntryKind { object: Hash, name: String, }, Unrepresentable { object: Hash, detail: String, }, TooManyParents { object: Hash, }, AuthorPayload { object: Hash, }, TagChain { object: Hash, }, DuplicateTreeEntry { object: Hash, }, TreeTooDeep { object: Hash, },
}
Expand description

A deliberate, spec’d refusal to translate (actionable; per-ref granularity is the caller’s job).

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Remix

Remix objects are not translated in v1 (SPEC-GIT-BRIDGE §8).

Fields

§object: Hash
§

FixedSizeChunking

Fixed-size chunked-blob manifests have no exact inverse (SPEC-GIT-BRIDGE §4).

Fields

§object: Hash
§chunk_size: u32
§

NonCanonicalChunking

Content-defined manifest a conformant mkit writer cannot have produced (≤ threshold total size, or boundaries that differ from the pinned FastCDC output) — it would not round-trip (SPEC-GIT-BRIDGE §4).

Fields

§object: Hash
§detail: &'static str
§

TimestampOverflow

Commit/tag timestamp exceeds i64::MAX (SPEC-GIT-BRIDGE §6.2).

Fields

§object: Hash
§timestamp: u64
§

TagName

Tag object name contains bytes outside the mkit ref grammar (SPEC-GIT-BRIDGE §7.1).

Fields

§object: Hash
§

RefName

Ref name is mkit-legal but git-illegal (SPEC-GIT-BRIDGE §12.1).

Fields

§name: String
§reason: &'static str
§

SchemaVersion

Object prologue carries a schema version this mapping does not cover (SPEC-GIT-BRIDGE §1.2).

Fields

§object: Hash

Import: submodule gitlink entry (SPEC-GIT-IMPORT §3.3). The object is the zero-padded git tree sha1.

Fields

§object: Hash
§path: String
§

TreeEntryName

Import: git tree-entry name mkit cannot store (SPEC-OBJECTS §4.1 deserialize-time rules).

Fields

§object: Hash
§name: String
§

UnknownTreeMode

Import: a git tree mode outside the pinned §3.3 table.

Fields

§object: Hash
§mode: String
§

NormalizedModeInFork

Import: a historic mode would normalize, but the state dir is fork-mode (normalization breaks shared-SHA passthrough).

Fields

§object: Hash
§mode: String
§

NegativeTimestamp

Import: pre-1970 git timestamp (mkit timestamps are u64).

Fields

§object: Hash
§timestamp: i64
§

Unparsable

Import: structurally unparsable git object (SPEC-GIT-IMPORT §3.2/§3.5 — refused per-ref, never coerced).

Fields

§object: Hash
§detail: String
§

BlobTooLarge

Import: blob over the 1 GiB per-file cap (SPEC-GIT-IMPORT §3.1).

Fields

§object: Hash
§size: u64
§

TooManyTreeEntries

Import: git tree with more entries than mkit’s decode cap — storing it would poison a signed object the store can never read back (SPEC-GIT-IMPORT §3.3).

Fields

§object: Hash
§count: usize
§

TreeEntryKind

Import: a tree entry’s git mode contradicts the actual kind of the object it names (e.g. mode 100644 → a commit). git tools barely tolerate these; mkit’s object model cannot represent them (SPEC-GIT-IMPORT §3.3).

Fields

§object: Hash
§name: String
§

Unrepresentable

Import: the translated object cannot serialize under SPEC-OBJECTS caps (oversize payload, illegal field) — refused per-ref rather than failing the whole run.

Fields

§object: Hash
§detail: String
§

TooManyParents

Import: more than 1000 parents (MAX_PARENTS).

Fields

§object: Hash
§

AuthorPayload

Import: author/tagger identity payload empty or over 4096.

Fields

§object: Hash
§

TagChain

Import: tag→tag chain beyond the pinned depth (16).

Fields

§object: Hash
§

DuplicateTreeEntry

Import: duplicate entry names after re-sorting to mkit order (git-representable as file+dir of one name; undecodable here).

Fields

§object: Hash
§

TreeTooDeep

Import: tree nesting beyond MAX_TREE_DEPTH (128).

Fields

§object: Hash

Trait Implementations§

Source§

impl Clone for Refusal

Source§

fn clone(&self) -> Refusal

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Refusal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Refusal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Refusal

Source§

impl From<Refusal> for BridgeError

Source§

fn from(r: Refusal) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Refusal

Source§

fn eq(&self, other: &Refusal) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Refusal

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.