Skip to main content

MetadataKey

Enum MetadataKey 

Source
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§

Source§

impl MetadataKey

Source

pub fn as_str(&self) -> &'static str

Trait Implementations§

Source§

impl Clone for MetadataKey

Source§

fn clone(&self) -> Self

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 Copy for MetadataKey

Source§

impl Debug for MetadataKey

Source§

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

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

impl Display for MetadataKey

Source§

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

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

impl Eq for MetadataKey

Source§

impl PartialEq for MetadataKey

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MetadataKey

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.