pub enum GitOp {
ClientFetchServerPush,
ClientPushServerFetch,
}Expand description
Git operation client request.
Variants§
ClientFetchServerPush
Client is doing a fetch. Server runs git-upload-pack.
ClientPushServerFetch
Client is going a push. Server runs git-fetch-pack.
Implementations§
Source§impl GitOp
impl GitOp
Sourcepub fn resource_id<S: Display>(self, resource: S) -> Vec<u8> ⓘ
pub fn resource_id<S: Display>(self, resource: S) -> Vec<u8> ⓘ
Return the resource ID that will be authorized for the operation on the git repository path. The operation must currently be bound to the authorized resource_id, otherwise the transfer function has no way to know what was authorized.
pub async fn write_request<W: AsyncWrite + Unpin, S: Display>( self, w: &mut W, resource: S, ) -> Result<(), Error>
pub fn from_resource_id(resource_id: &[u8]) -> Result<GitOp, Error>
pub fn to_byte(self) -> u8
pub fn from_byte(b: u8) -> Option<Self>
Trait Implementations§
impl Copy for GitOp
impl StructuralPartialEq for GitOp
Auto Trait Implementations§
impl Freeze for GitOp
impl RefUnwindSafe for GitOp
impl Send for GitOp
impl Sync for GitOp
impl Unpin for GitOp
impl UnsafeUnpin for GitOp
impl UnwindSafe for GitOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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