Skip to main content

Overlay

Struct Overlay 

Source
pub struct Overlay<'a> { /* private fields */ }
Expand description

The repository as it would be after the merge, for the gates: every read sees the merge’s new objects on top of the store, and nothing can be written through it.

The gates (BranchProtectionGate, SignedCommitsGate, AiTrailerGate) read commits through GitServe::read; running them here is what lets CheckMerge judge a merge commit that does not exist yet — and the real merge judge it before it is stored.

Implementations§

Source§

impl<'a> Overlay<'a>

Source

pub fn new(inner: &'a dyn GitServe, new: &'a NewObjects) -> Self

inner with new on top.

Trait Implementations§

Source§

impl GitOps for Overlay<'_>

Source§

fn put(&self, _pack: &[u8], _refs: &[RefUpdate]) -> Result<TxId>

One push: pack bytes and ref updates, durable before this returns. Read more
Source§

fn put_pack(&self, _bytes: &[u8]) -> Result<TxId>

The pack half of put, on its own.
Source§

fn put_refs(&self, _updates: &[RefUpdate]) -> Result<TxId>

The ref half of put, on its own.
Source§

fn get(&self, oid: Oid<'_>) -> Result<Option<Stored>>

The stored bytes of one object.
Source§

fn has(&self, oid: Oid<'_>) -> Result<bool>

Is this object here? The negotiation call, made a thousand at a time.
Source§

fn size(&self, oid: Oid<'_>) -> Result<Option<u64>>

Post-resolution size.
Source§

fn extents(&self, oids: &[Oid<'_>]) -> Result<Vec<Option<Extent>>>

Byte extents, in bulk — the wire path.
Source§

fn refs(&self) -> Result<Vec<RefRow>>

The current ref namespace.
Source§

fn update_ref( &self, _name: &str, _old: Option<Oid<'_>>, _new: Option<Oid<'_>>, ) -> Result<TxId>

Compare-and-swap one ref.
Source§

fn put_refs_cas(&self, _edits: &[RefCas<'_>]) -> Result<TxId>

Apply every edit or none. The git push --atomic primitive. Read more
Source§

fn reachable(&self, want: &[Oid<'_>], have: &[Oid<'_>]) -> Result<Vec<Vec<u8>>>

want minus have, the object closure a fetch must send.
Source§

fn gc(&self) -> Result<GcReport>

Reachability, drop the dead index rows, then compact.
Source§

fn put_pack_observed( &self, bytes: &[u8], progress: &dyn PackProgress, ) -> Result<TxId, Error>

put_pack, saying how far it has got while it is still getting there. Read more
Source§

fn publishes_pack_progress(&self) -> bool

Does put_pack_observed actually publish? false for the default implementation. Read more
Source§

impl GitServe for Overlay<'_>

Source§

fn read(&self, oid: Oid<'_>) -> Result<Option<(ObjType, Vec<u8>)>>

The object, INFLATED and delta-resolved — what GitOps::get deliberately is not. Read more
Source§

fn header(&self, oid: Oid<'_>) -> Result<Option<(ObjType, u64)>>

Kind and post-resolution size without the payload. The type probe. Read more
Source§

fn sizes(&self, oids: &[Oid<'_>]) -> Result<Vec<Option<u64>>>

Bulk post-resolution size. The negotiation path calls it a thousand at a time. Read more
Source§

fn head(&self) -> Result<Option<RefRow>>

HEAD. Read more
Source§

fn set_head(&self, _target: &str) -> Result<TxId>

Point HEAD. The other half of the pair; point_head_at is the live consumer.
Source§

fn emit_pack( &self, objects: &[Oid<'_>], have: &[Oid<'_>], caps: &Caps, out: &mut dyn Write, ) -> Result<PackStats>

Emit a packfile containing exactly objects, deduplicated, honouring caps, onto out. Read more
Source§

fn select(&self, want: &[Oid<'_>], have: &[Oid<'_>]) -> Result<Option<ReachSet>>

Negotiation: want minus have, with the two derived facts a caller cannot recompute cheaply. Read more
Source§

fn index_now(&self) -> Result<usize, Error>

Make every object this store has accepted addressable by oid, now. Read more
Source§

fn set_head_projected(&self, target: &str) -> Result<TxId, Error>

Point HEAD from an authority the caller keeps somewhere else, and re-applies on every open. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Overlay<'a>

§

impl<'a> !UnwindSafe for Overlay<'a>

§

impl<'a> Freeze for Overlay<'a>

§

impl<'a> Send for Overlay<'a>

§

impl<'a> Sync for Overlay<'a>

§

impl<'a> Unpin for Overlay<'a>

§

impl<'a> UnsafeUnpin for Overlay<'a>

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more