pub struct PackCeiling {
pub bytes: u64,
pub refusal: String,
}Expand description
A byte ceiling for one push, and the line the client is told past it.
The twin of gunnar_wire::receive_pack::PackCeiling, which is where it is
enforced. Two declarations of two fields rather than one shared type,
deliberately: this crate does not depend on gunnar-wire and must not start
— the same boundary crate::ServiceRequest::git_protocol is a raw
String for. gunnar-server holds both and converts, which is
four lines at one seam (transport.rs) rather than a dependency edge
between two crates that have stayed apart on purpose. There is no logic here to duplicate: the deciding
is in the gate below, the enforcing is in the receive loop, and this is the
number travelling between them.
Fields§
§bytes: u64Packfile bytes past which the transfer is aborted mid-stream. A push of exactly this many bytes lands.
refusal: StringWhat the client is told when it trips — a whole refusal, naming the
cap and where to pay, the same shape PlanVerdict::Refuse carries,
because a tenant cut off mid-push must not be left reading “the pack is
malformed”.
Trait Implementations§
Source§impl Clone for PackCeiling
impl Clone for PackCeiling
Source§impl Debug for PackCeiling
impl Debug for PackCeiling
impl Eq for PackCeiling
Source§impl PartialEq for PackCeiling
impl PartialEq for PackCeiling
impl StructuralPartialEq for PackCeiling
Auto Trait Implementations§
impl Freeze for PackCeiling
impl RefUnwindSafe for PackCeiling
impl Send for PackCeiling
impl Sync for PackCeiling
impl Unpin for PackCeiling
impl UnsafeUnpin for PackCeiling
impl UnwindSafe for PackCeiling
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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§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.