gitbundle_sdk/models/
commit_branch.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CommitBranch {
17 #[serde(
18 rename = "commit",
19 default,
20 with = "::serde_with::rust::double_option",
21 skip_serializing_if = "Option::is_none"
22 )]
23 pub commit: Option<Option<Box<models::Commit>>>,
24 #[serde(rename = "name")]
25 pub name: String,
26 #[serde(rename = "sha")]
27 pub sha: String,
28}
29
30impl CommitBranch {
31 pub fn new(name: String, sha: String) -> CommitBranch {
32 CommitBranch {
33 commit: None,
34 name,
35 sha,
36 }
37 }
38}