pub enum MetadataKey {
Show 19 variants
Head,
RemoteUrl,
RepoName,
RepoOwner,
CurrentBranch,
ApiKey,
ApiKeyOrigin,
LastRenameId,
MainLastCheckedAt,
MainLastObservedHead,
MainLastFetchIntegrityError,
MainHydratedHead,
HydratedTree,
HashFormat,
SparsePaths,
ViewSpec,
RestrictedBlobs,
KnownLostBlobs,
ParentSyncDeferred,
}Expand description
Repository metadata key-value pairs
Variants§
Head
RemoteUrl
RepoName
RepoOwner
CurrentBranch
ApiKey
ApiKeyOrigin
Normalized origin (scheme://host[:port]) the repository ApiKey was
issued by. A repository key is only ever presented to this origin, so
retargeting the remote (oak push -r, OAK_REMOTE, --remote) can
never ship this checkout’s key to another server. Absent on
checkouts written by older clients: consumers then bind the key to the
stored RemoteUrl, and the CLI pins it here before any rewrite of
RemoteUrl.
LastRenameId
MainLastCheckedAt
MainLastObservedHead
The last verified observation of the remote main head:
"<unix_secs> <head-hash>" (an empty hash when the remote main had
no head). The head is stored WITH its own timestamp so a reader can
tell whether the timestamp still describes the local main it is
looking at; binaries that predate this key ignore it and keep using
MainLastCheckedAt alone.
MainLastFetchIntegrityError
Non-empty when the last attempted verified fetch of server-owned main
failed integrity checks. Checkout-free review/diff must not silently use
stale local main evidence while this is set.
MainHydratedHead
The main head whose snapshot was last verified to have every blob
local. Blobs are never deleted, so a later pull at that head skips the
whole-snapshot check, and a pull to a newer head checks only the blobs
that changed since this one. Any other head is checked in full.
HydratedTree
The root tree hash whose every blob was last verified to be local (no sparse cone, nothing withheld or adjudicated lost). Blobs are never deleted, so status/commit/merge resolving that tree again skip the per-entry presence check. Any other tree is checked in full.
HashFormat
Repo-level content-addressing format (see crate::hash_format).
Absent means v1; nothing writes this key yet — v2 is prepared but
cannot be enabled until an explicit migration ships.
SparsePaths
Active sparse-checkout cone: a newline-separated list of path prefixes
the working tree is scoped to (see crate::sparse). Absent or empty
means a full (non-sparse) checkout. Written by oak clone --path and
oak sparse.
ViewSpec
The view this checkout holds: a ViewSpec in canonical form. Its
commits are view commits; the CLI sends the view on every request so
the server answers in them. Absent means a full checkout. Written by
oak clone ORG/REPO --path DIR against a server that serves views.
RestrictedBlobs
Blob hashes the server has withheld from this clone because path-based permissions deny the user (newline-separated). Recorded from pull/clone responses so status/commit can tell “restricted, never materialized” apart from a real deletion. A hash that later becomes locally present (access granted, then pulled) is simply ignored by consumers — they check blob absence before treating a path as restricted.
KnownLostBlobs
Blob hashes whose bytes an operator explicitly adjudicated as permanently unavailable legacy content. Kept separate from access restrictions so the repository remains visibly degraded.
ParentSyncDeferred
JSON marker {"branch","parent","deferred_at"} written by
oak pull --branch-only: the named branch was refreshed from its
remote without converging with its parent. Cleared (set empty) by the
next pull that completes the parent sync. Consumers must ignore it
when empty, unparseable, or naming a different branch.
Implementations§
Trait Implementations§
Source§impl Clone for MetadataKey
impl Clone for MetadataKey
impl Copy for MetadataKey
Source§impl Debug for MetadataKey
impl Debug for MetadataKey
Source§impl Display for MetadataKey
impl Display for MetadataKey
impl Eq for MetadataKey
Source§impl PartialEq for MetadataKey
impl PartialEq for MetadataKey
impl StructuralPartialEq for MetadataKey
Auto Trait Implementations§
impl Forget for MetadataKey
impl Freeze for MetadataKey
impl Move for MetadataKey
impl RefUnwindSafe for MetadataKey
impl Send for MetadataKey
impl Sync for MetadataKey
impl Unpin for MetadataKey
impl UnsafeUnpin for MetadataKey
impl UnwindSafe for MetadataKey
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> 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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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