#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct BranchAndCommit {
#[builder(custom(type = super::Branch, convert = Box::new))]
#[serde(rename = "branch")]
branch: Box<super::Branch>,
#[builder(custom(type = super::Commit, convert = Box::new))]
#[serde(rename = "commit")]
commit: Box<super::Commit>,
}
impl BranchAndCommit {
#[inline]
pub fn new(branch: super::Branch, commit: super::Commit) -> Self {
Self::builder().branch(branch).commit(commit).build()
}
#[inline]
pub fn branch(&self) -> &super::Branch {
&*self.branch
}
#[inline]
pub fn commit(&self) -> &super::Commit {
&*self.commit
}
}