pub struct Commit {
pub id: String,
pub parent_ids: Vec<String>,
pub message: String,
pub author: String,
pub email: String,
pub root_hash: Option<String>,
pub timestamp: OffsetDateTime,
}Fields§
§id: String§parent_ids: Vec<String>§message: String§email: String§root_hash: Option<String>§timestamp: OffsetDateTimeImplementations§
source§impl Commit
impl Commit
pub fn from_new_and_id(new_commit: &NewCommit, id: String) -> Commit
pub fn has_ancestor( &self, parent_id: &str, commit_reader: &CommitReader, ) -> Result<bool, OxenError>
pub fn update_root_hash(&mut self, root_hash: String)
pub fn from_with_size(commit: &CommitWithSize) -> Commit
pub fn from_with_branch_name(commit: &CommitWithBranchName) -> Commit
pub fn from_branch( commit_reader: &CommitReader, branch: &Branch, ) -> Result<Commit, OxenError>
pub fn to_uri_encoded(&self) -> String
pub fn get_user(&self) -> User
Trait Implementations§
source§impl<'de> Deserialize<'de> for Commit
impl<'de> Deserialize<'de> for Commit
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Error for Commit
impl Error for Commit
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<Commit> for WorkspaceCommit
impl From<Commit> for WorkspaceCommit
source§impl From<WorkspaceCommit> for Commit
impl From<WorkspaceCommit> for Commit
source§fn from(val: WorkspaceCommit) -> Self
fn from(val: WorkspaceCommit) -> Self
Converts to this type from the input type.
source§impl PartialEq for Commit
impl PartialEq for Commit
impl Eq for Commit
Auto Trait Implementations§
impl Freeze for Commit
impl RefUnwindSafe for Commit
impl Send for Commit
impl Sync for Commit
impl Unpin for Commit
impl UnwindSafe for Commit
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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<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