Struct Commit

Source
pub struct Commit {
    pub added: Vec<String>,
    pub author: Committer,
    pub committer: Committer,
    pub distinct: bool,
    pub id: String,
    pub message: String,
    pub modified: Vec<String>,
    pub removed: Vec<String>,
    pub timestamp: DateTime<Utc>,
    pub tree_id: String,
    pub url: String,
}
Expand description

Commit

JSON schema
{
 "title": "Commit",
 "type": "object",
 "required": [
   "added",
   "author",
   "committer",
   "distinct",
   "id",
   "message",
   "modified",
   "removed",
   "timestamp",
   "tree_id",
   "url"
 ],
 "properties": {
   "added": {
     "description": "An array of files added in the commit. For extremely large commits where GitHub is unable to calculate this list in a timely manner, this may be empty even if files were added.",
     "type": "array",
     "items": {
       "type": "string"
     }
   },
   "author": {
     "$ref": "#/definitions/committer"
   },
   "committer": {
     "$ref": "#/definitions/committer"
   },
   "distinct": {
     "description": "Whether this commit is distinct from any that have been pushed before.",
     "type": "boolean"
   },
   "id": {
     "type": "string"
   },
   "message": {
     "description": "The commit message.",
     "type": "string"
   },
   "modified": {
     "description": "An array of files modified by the commit. For extremely large commits where GitHub is unable to calculate this list in a timely manner, this may be empty even if files were modified.",
     "type": "array",
     "items": {
       "type": "string"
     }
   },
   "removed": {
     "description": "An array of files removed in the commit. For extremely large commits where GitHub is unable to calculate this list in a timely manner, this may be empty even if files were removed.",
     "type": "array",
     "items": {
       "type": "string"
     }
   },
   "timestamp": {
     "description": "The ISO 8601 timestamp of the commit.",
     "type": "string",
     "format": "date-time"
   },
   "tree_id": {
     "type": "string"
   },
   "url": {
     "description": "URL that points to the commit API resource.",
     "type": "string",
     "format": "uri"
   }
 },
 "additionalProperties": false,
 "$schema": "http://json-schema.org/draft-07/schema"
}

Fields§

§added: Vec<String>

An array of files added in the commit. For extremely large commits where GitHub is unable to calculate this list in a timely manner, this may be empty even if files were added.

§author: Committer§committer: Committer§distinct: bool

Whether this commit is distinct from any that have been pushed before.

§id: String§message: String

The commit message.

§modified: Vec<String>

An array of files modified by the commit. For extremely large commits where GitHub is unable to calculate this list in a timely manner, this may be empty even if files were modified.

§removed: Vec<String>

An array of files removed in the commit. For extremely large commits where GitHub is unable to calculate this list in a timely manner, this may be empty even if files were removed.

§timestamp: DateTime<Utc>

The ISO 8601 timestamp of the commit.

§tree_id: String§url: String

URL that points to the commit API resource.

Implementations§

Trait Implementations§

Source§

impl Clone for Commit

Source§

fn clone(&self) -> Commit

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Commit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Commit

Source§

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 From<&Commit> for Commit

Source§

fn from(value: &Commit) -> Self

Converts to this type from the input type.
Source§

impl From<Commit> for Commit

Source§

fn from(value: Commit) -> Self

Converts to this type from the input type.
Source§

impl Serialize for Commit

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<Commit> for Commit

Source§

type Error = String

The type returned in the event of a conversion error.
Source§

fn try_from(value: Commit) -> Result<Self, String>

Performs the conversion.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,