pub struct PushRequest {
pub commands: Vec<RefUpdate>,
pub capabilities: PushCapabilities,
pub options: Option<PushOptions>,
}Expand description
The parsed receive-pack request (ADR-013 §3, ADR-020 §1):
commands— the command lines (<old> <new> <ref>) resolved to the zero-id shapes:old=zero= create (RefUpdate::expectedNone),new=zero= delete (RefUpdate::newNone), both non-zero = an ordinary update. An empty command set is the client-side nothing-to-do — a distinct shape, not an error (ADR-013 §3: the machine replies flush, no report; seePushRequest::is_nothing_to_do). Duplicate ref commands fail closed at parse.capabilities— the client’s selection (the parse accepts only the advertised set plusquiet/agent; unknown and duplicate capabilities fail closed).options— the parsed push-options section (PushOptions, the(key, value)pairs verbatim, repeated keys preserved);Nonewhen the cap was not negotiated (v1: the gate is off — never negotiated, the section is never parsed, the pack follows the command flush directly, ADR-013 §11).
Fields§
§commands: Vec<RefUpdate>The command-derived ref updates, request order (the prepare/CAS inputs; ADR-013 §6–7).
capabilities: PushCapabilitiesThe client’s capability selection (ADR-013 §2; the accepted
set is the advertised set plus quiet/agent).
options: Option<PushOptions>The negotiated push-options section (ADR-013 §11) — None
until the gate opens.
Implementations§
Source§impl PushRequest
impl PushRequest
Sourcepub fn is_nothing_to_do(&self) -> bool
pub fn is_nothing_to_do(&self) -> bool
The client-side nothing-to-do shape (ADR-013 §3): an immediate flush with no commands — the machine replies flush, no report.
Trait Implementations§
Source§impl Clone for PushRequest
impl Clone for PushRequest
Source§impl Debug for PushRequest
impl Debug for PushRequest
Source§impl Default for PushRequest
impl Default for PushRequest
impl Eq for PushRequest
Source§impl PartialEq for PushRequest
impl PartialEq for PushRequest
impl StructuralPartialEq for PushRequest
Auto Trait Implementations§
impl Freeze for PushRequest
impl RefUnwindSafe for PushRequest
impl Send for PushRequest
impl Sync for PushRequest
impl Unpin for PushRequest
impl UnsafeUnpin for PushRequest
impl UnwindSafe for PushRequest
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
Compare self to
key and return true if they are equal.