pub enum Delivery {
Session,
Advertisement,
StatelessRpc,
}Expand description
Which part of a git conversation one call to the seam carries.
§Why an SSH crate names an HTTP shape
This module is the seam, not the SSH transport: it is the join every
front end plugs the protocol state machines into, and gunnar-http plugs
into this one rather than growing a second copy of it. That is the whole
reason the crate docs above call GitTransport “the seam” and not “the SSH
bridge”.
The alternative was a second trait in gunnar-http with its own
ServiceRequest, its own authorisation call and its own join to
gunnar-wire — which is exactly the shape that produces two answers to
“may this principal push”. Sharing one seam costs an enum with three
variants and no dependencies; gunnar-http linking gunnar-ssh adds
nothing to any build, because a gunnar server that speaks HTTP also speaks
SSH and gunnar-ssh was already there.
If a build ever wants HTTP without SSH, this module and
crate::server::Dispatch move to their own crate and nothing else
changes. That build does not exist today, and inventing the crate for it
now would be inventing a boundary before there is anything on both sides of
it.
Variants§
Session
One connection carries the advertisement, the negotiation and the pack.
This is SSH, and it is what gunnar-wire’s Session::Connected means.
Advertisement
Smart HTTP GET /<path>/info/refs?service=…: write the advertisement
and stop. Nothing is read from the client.
StatelessRpc
Smart HTTP POST /<path>/<service>: one stateless-rpc round.
Trait Implementations§
impl Copy for Delivery
impl Eq for Delivery
impl StructuralPartialEq for Delivery
Auto Trait Implementations§
impl Freeze for Delivery
impl RefUnwindSafe for Delivery
impl Send for Delivery
impl Sync for Delivery
impl Unpin for Delivery
impl UnsafeUnpin for Delivery
impl UnwindSafe for Delivery
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.