pub enum Operation {
Download,
Upload,
}Expand description
The <operation> argument of git-lfs-transfer.
Only these two exist. The specification says “other operations may be implemented in the future”, which on a server means refuse the ones you do not know: a third operation accepted by accident would be a session whose permitted commands nobody decided.
Variants§
Download
download: the client is fetching objects. Needs Read.
Upload
upload: the client is pushing objects. Needs Write.
Implementations§
Source§impl Operation
impl Operation
Sourcepub const ALL: &'static [Operation]
pub const ALL: &'static [Operation]
Every operation, in wire order. The dispatch table in gunnar-ssh is
asserted against this so the two lists cannot drift.
Sourcepub fn may_upload(self) -> bool
pub fn may_upload(self) -> bool
May this session upload objects?
Sourcepub fn may_download(self) -> bool
pub fn may_download(self) -> bool
May this session download objects?
upload does not imply download. The specification lists
get-object under Downloads and says those commands “may be used if
the operation was download”. An upload session that also served objects
would be a read grant handed out by a write one. Small, but exactly the
wrong direction.
Trait Implementations§
impl Copy for Operation
impl Eq for Operation
Source§impl Ord for Operation
impl Ord for Operation
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Operation
impl PartialOrd for Operation
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.