pub enum ExpectedRevision {
New,
Exactly(CeremonyRevision),
}Expand description
What the caller believes is stored, checked before a commit lands.
Creating and updating are distinguished on purpose: without
ExpectedRevision::New, two callers could both believe they are
starting a ceremony and the second would silently overwrite the
first.
Variants§
New
Nothing is stored for this ceremony yet.
Exactly(CeremonyRevision)
Exactly this revision is stored.
Implementations§
Source§impl ExpectedRevision
impl ExpectedRevision
pub fn matches(self, stored: Option<CeremonyRevision>) -> bool
Sourcepub fn resulting_revision(self) -> CeremonyRevision
pub fn resulting_revision(self) -> CeremonyRevision
The revision a commit produces when this expectation holds.
Trait Implementations§
Source§impl Clone for ExpectedRevision
impl Clone for ExpectedRevision
Source§fn clone(&self) -> ExpectedRevision
fn clone(&self) -> ExpectedRevision
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExpectedRevision
Source§impl Debug for ExpectedRevision
impl Debug for ExpectedRevision
Source§impl<'de> Deserialize<'de> for ExpectedRevision
impl<'de> Deserialize<'de> for ExpectedRevision
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
impl Eq for ExpectedRevision
Source§impl PartialEq for ExpectedRevision
impl PartialEq for ExpectedRevision
Source§impl Serialize for ExpectedRevision
impl Serialize for ExpectedRevision
impl StructuralPartialEq for ExpectedRevision
Auto Trait Implementations§
impl Freeze for ExpectedRevision
impl RefUnwindSafe for ExpectedRevision
impl Send for ExpectedRevision
impl Sync for ExpectedRevision
impl Unpin for ExpectedRevision
impl UnsafeUnpin for ExpectedRevision
impl UnwindSafe for ExpectedRevision
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