pub struct Workspace { /* private fields */ }Implementations§
source§impl Workspace
impl Workspace
pub fn new( main_branch: Option<Box<dyn Branch>>, resume_branch: Option<Box<dyn Branch>>, cached_branch: Option<Box<dyn Branch>>, additional_colocated_branches: HashMap<&str, &str>, resume_branch_additional_colocated_branches: HashMap<&str, &str>, dir: Option<&Path>, path: Option<&Path>, format: Option<impl AsFormat>, ) -> Self
👎Deprecated since 0.1.0: Use WorkspaceBuilder instead
pub fn temporary() -> Result<Self, Error>
pub fn from_url(url: &Url) -> Result<Self, Error>
pub fn builder() -> WorkspaceBuilder
pub fn main_branch(&self) -> Option<&dyn Branch>
pub fn set_main_branch(&mut self, branch: Box<dyn Branch>) -> Result<(), Error>
pub fn local_tree(&self) -> &WorkingTree
pub fn refreshed(&self) -> bool
pub fn resume_branch(&self) -> Option<&dyn Branch>
pub fn path(&self) -> PathBuf
pub fn changes_since_main(&self) -> bool
pub fn changes_since_base(&self) -> bool
pub fn base_revid(&self) -> Option<RevisionId>
sourcepub fn any_branch_changes(&self) -> bool
pub fn any_branch_changes(&self) -> bool
Have any branch changes at all been made?
Includes changes that already existed in the resume branch
pub fn additional_colocated_branches(&self) -> HashMap<String, String>
pub fn changed_branches( &self, ) -> Vec<(String, Option<RevisionId>, Option<RevisionId>)>
pub fn main_colo_revid(&self) -> HashMap<String, RevisionId>
pub fn base_tree(&self) -> Result<Box<dyn Tree>, BrzError>
pub fn defer_destroy(&mut self)
pub fn publish_changes( &self, target_branch: Option<&dyn Branch>, mode: Mode, name: &str, get_proposal_description: impl FnOnce(DescriptionFormat, Option<&MergeProposal>) -> String, get_proposal_commit_message: Option<impl FnOnce(Option<&MergeProposal>) -> Option<String>>, get_proposal_title: Option<impl FnOnce(Option<&MergeProposal>) -> Option<String>>, forge: Option<&Forge>, allow_create_proposal: Option<bool>, labels: Option<Vec<String>>, overwrite_existing: Option<bool>, existing_proposal: Option<MergeProposal>, reviewers: Option<Vec<String>>, tags: Option<HashMap<String, RevisionId>>, derived_owner: Option<&str>, allow_collaboration: Option<bool>, stop_revision: Option<&RevisionId>, ) -> Result<PublishResult, PublishError>
pub fn propose( &self, name: &str, description: &str, target_branch: Option<&dyn Branch>, forge: Option<Forge>, existing_proposal: Option<MergeProposal>, tags: Option<HashMap<String, RevisionId>>, labels: Option<Vec<String>>, overwrite_existing: Option<bool>, commit_message: Option<&str>, allow_collaboration: Option<bool>, title: Option<&str>, allow_empty: Option<bool>, reviewers: Option<Vec<String>>, owner: Option<&str>, auto_merge: Option<bool>, ) -> Result<(MergeProposal, bool), Error>
pub fn push_derived( &self, name: &str, target_branch: Option<&dyn Branch>, forge: Option<Forge>, tags: Option<HashMap<String, RevisionId>>, overwrite_existing: Option<bool>, owner: Option<&str>, ) -> Result<(Box<dyn Branch>, Url), Error>
pub fn push( &self, tags: Option<HashMap<String, RevisionId>>, ) -> Result<(), Error>
pub fn show_diff( &self, outf: Box<dyn Write + Send>, old_label: Option<&str>, new_label: Option<&str>, ) -> Result<(), BrzError>
pub fn destroy(&mut self) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for Workspace
impl !RefUnwindSafe for Workspace
impl Send for Workspace
impl !Sync for Workspace
impl Unpin for Workspace
impl !UnwindSafe for Workspace
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