MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / create_draft_view

Method create_draft_view

atomic-repository/src/repository/views.rs:664–670  ·  view source on GitHub ↗

Create a new Draft view parented on an explicit named parent. Unlike [`Repository::create_view`], which parents on the nearest shared ancestor of the *current* view, this method parents on the given view regardless of what is currently checked out. The new view's change log starts empty. Returns `ViewNotFound` if the parent does not exist and `ViewAlreadyExists` if the name is taken.

(
        &mut self,
        name: &str,
        parent_name: &str,
    )

Source from the content-addressed store, hash-verified

662 /// Returns `ViewNotFound` if the parent does not exist and
663 /// `ViewAlreadyExists` if the name is taken.
664 pub fn create_draft_view(
665 &mut self,
666 name: &str,
667 parent_name: &str,
668 ) -> Result<(), RepositoryError> {
669 self.create_view_with_identity(name, ViewScope::Draft, Some(parent_name))
670 }
671
672 /// Create a view with an explicit scope and optional named parent.
673 ///

Calls 1