pub struct Precondition {
pub path: String,
pub expected: Option<Oid>,
}Expand description
A precondition on one path: the blob oid the caller expects to find in the
base tree. expected == None asserts the path is absent (a create).
Fields§
§path: String§expected: Option<Oid>Implementations§
Source§impl Precondition
impl Precondition
Sourcepub fn expect_blob(path: impl Into<String>, blob: Oid) -> Self
pub fn expect_blob(path: impl Into<String>, blob: Oid) -> Self
The path must currently hold exactly this blob (an update of known content).
Sourcepub fn expect_absent(path: impl Into<String>) -> Self
pub fn expect_absent(path: impl Into<String>) -> Self
The path must currently be absent (a create).
Trait Implementations§
Source§impl Clone for Precondition
impl Clone for Precondition
Source§fn clone(&self) -> Precondition
fn clone(&self) -> Precondition
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 moreAuto Trait Implementations§
impl Freeze for Precondition
impl RefUnwindSafe for Precondition
impl Send for Precondition
impl Sync for Precondition
impl Unpin for Precondition
impl UnsafeUnpin for Precondition
impl UnwindSafe for Precondition
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