pub enum UploadPack {
Done {
rid: RepoId,
remote: PublicKey,
status: String,
},
Write {
rid: RepoId,
remote: PublicKey,
progress: Progress,
},
Error {
rid: RepoId,
remote: PublicKey,
err: String,
},
PackProgress {
rid: RepoId,
remote: PublicKey,
transmitted: usize,
},
}Expand description
Events that can occur when an upload-pack process is running.
Variants§
Done
The upload-pack process finished with status.
Fields
Write
The upload-pack process emitted some Progress data.
Fields
Error
An error occurred during the upload-pack process.
Fields
PackProgress
The upload-pack packfile transmission progress.
Implementations§
Source§impl UploadPack
impl UploadPack
Sourcepub fn pack_progress(
rid: RepoId,
remote: PublicKey,
transmitted: usize,
) -> UploadPack
pub fn pack_progress( rid: RepoId, remote: PublicKey, transmitted: usize, ) -> UploadPack
Construct a UploadPack::PackProgress event.
Sourcepub fn write(rid: RepoId, remote: PublicKey, progress: Progress) -> UploadPack
pub fn write(rid: RepoId, remote: PublicKey, progress: Progress) -> UploadPack
Construct a UploadPack::Write event.
Sourcepub fn done(rid: RepoId, remote: PublicKey, status: ExitStatus) -> UploadPack
pub fn done(rid: RepoId, remote: PublicKey, status: ExitStatus) -> UploadPack
Construct a UploadPack::Done event.
If error is None the process finished successfully, otherwise it
finished with an error.
pub fn error(rid: RepoId, remote: PublicKey, err: Error) -> UploadPack
Trait Implementations§
Source§impl Clone for UploadPack
impl Clone for UploadPack
Source§fn clone(&self) -> UploadPack
fn clone(&self) -> UploadPack
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UploadPack
impl Debug for UploadPack
Source§impl<'de> Deserialize<'de> for UploadPack
impl<'de> Deserialize<'de> for UploadPack
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UploadPack, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UploadPack, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<UploadPack> for Event
impl From<UploadPack> for Event
Source§fn from(value: UploadPack) -> Event
fn from(value: UploadPack) -> Event
Converts to this type from the input type.
Source§impl PartialEq for UploadPack
impl PartialEq for UploadPack
Source§impl Serialize for UploadPack
impl Serialize for UploadPack
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for UploadPack
impl StructuralPartialEq for UploadPack
Auto Trait Implementations§
impl Freeze for UploadPack
impl RefUnwindSafe for UploadPack
impl Send for UploadPack
impl Sync for UploadPack
impl Unpin for UploadPack
impl UnwindSafe for UploadPack
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<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
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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