#[non_exhaustive]pub struct CreateOptions {
pub parents: bool,
pub exist_ok: bool,
pub expected_revision: Option<Revision>,
}Expand description
Options controlling directory and symbolic-link creation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parents: boolWhether missing parent directories are created.
exist_ok: boolWhether an existing compatible node is accepted.
expected_revision: Option<Revision>An optional optimistic precondition on an existing target.
Implementations§
Source§impl CreateOptions
impl CreateOptions
Sourcepub const fn parents(self, parents: bool) -> Self
pub const fn parents(self, parents: bool) -> Self
Sets whether missing parent directories are created.
Sourcepub const fn exist_ok(self, exist_ok: bool) -> Self
pub const fn exist_ok(self, exist_ok: bool) -> Self
Sets whether an existing compatible node is accepted.
Sourcepub const fn expected_revision(
self,
expected_revision: Option<Revision>,
) -> Self
pub const fn expected_revision( self, expected_revision: Option<Revision>, ) -> Self
Sets the optimistic revision precondition.
Trait Implementations§
Source§impl Clone for CreateOptions
impl Clone for CreateOptions
Source§fn clone(&self) -> CreateOptions
fn clone(&self) -> CreateOptions
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 CreateOptions
Source§impl Debug for CreateOptions
impl Debug for CreateOptions
Source§impl Default for CreateOptions
impl Default for CreateOptions
Source§fn default() -> CreateOptions
fn default() -> CreateOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CreateOptions
impl<'de> Deserialize<'de> for CreateOptions
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 CreateOptions
Source§impl PartialEq for CreateOptions
impl PartialEq for CreateOptions
Source§impl Serialize for CreateOptions
impl Serialize for CreateOptions
impl StructuralPartialEq for CreateOptions
Auto Trait Implementations§
impl Freeze for CreateOptions
impl RefUnwindSafe for CreateOptions
impl Send for CreateOptions
impl Sync for CreateOptions
impl Unpin for CreateOptions
impl UnsafeUnpin for CreateOptions
impl UnwindSafe for CreateOptions
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