pub struct Changeset {
pub proc: Option<Arc<DaggerSessionProc>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<DaggerSessionProc>>§selection: Selection§graphql_client: DynGraphQLClientImplementations§
Source§impl Changeset
impl Changeset
Sourcepub async fn added_paths(&self) -> Result<Vec<String>, DaggerError>
pub async fn added_paths(&self) -> Result<Vec<String>, DaggerError>
Files and directories that were added in the newer directory.
Sourcepub async fn export(
&self,
path: impl Into<String>,
) -> Result<String, DaggerError>
pub async fn export( &self, path: impl Into<String>, ) -> Result<String, DaggerError>
Applies the diff represented by this changeset to a path on the host.
§Arguments
path- Location of the copied directory (e.g., “logs/”).
Sourcepub async fn id(&self) -> Result<ChangesetId, DaggerError>
pub async fn id(&self) -> Result<ChangesetId, DaggerError>
A unique identifier for this Changeset.
Sourcepub async fn is_empty(&self) -> Result<bool, DaggerError>
pub async fn is_empty(&self) -> Result<bool, DaggerError>
Returns true if the changeset is empty (i.e. there are no changes).
Sourcepub fn layer(&self) -> Directory
pub fn layer(&self) -> Directory
Return a snapshot containing only the created and modified files
Sourcepub async fn modified_paths(&self) -> Result<Vec<String>, DaggerError>
pub async fn modified_paths(&self) -> Result<Vec<String>, DaggerError>
Files and directories that existed before and were updated in the newer directory.
Sourcepub async fn removed_paths(&self) -> Result<Vec<String>, DaggerError>
pub async fn removed_paths(&self) -> Result<Vec<String>, DaggerError>
Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.
Sourcepub async fn sync(&self) -> Result<ChangesetId, DaggerError>
pub async fn sync(&self) -> Result<ChangesetId, DaggerError>
Force evaluation in the engine.
Sourcepub fn with_changeset(&self, changes: impl IntoID<ChangesetId>) -> Changeset
pub fn with_changeset(&self, changes: impl IntoID<ChangesetId>) -> Changeset
Add changes to an existing changeset By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument
§Arguments
changes- Changes to merge into the actual changesetopt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn with_changeset_opts(
&self,
changes: impl IntoID<ChangesetId>,
opts: ChangesetWithChangesetOpts,
) -> Changeset
pub fn with_changeset_opts( &self, changes: impl IntoID<ChangesetId>, opts: ChangesetWithChangesetOpts, ) -> Changeset
Add changes to an existing changeset By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument
§Arguments
changes- Changes to merge into the actual changesetopt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn with_changesets(&self, changes: Vec<ChangesetId>) -> Changeset
pub fn with_changesets(&self, changes: Vec<ChangesetId>) -> Changeset
Add changes from multiple changesets using git octopus merge strategy This is more efficient than chaining multiple withChangeset calls when merging many changesets. Only FAIL and FAIL_EARLY conflict strategies are supported (octopus merge cannot use -X ours/theirs).
§Arguments
changes- List of changesets to merge into the actual changesetopt- optional argument, see inner type for documentation, use_opts to use
Sourcepub fn with_changesets_opts(
&self,
changes: Vec<ChangesetId>,
opts: ChangesetWithChangesetsOpts,
) -> Changeset
pub fn with_changesets_opts( &self, changes: Vec<ChangesetId>, opts: ChangesetWithChangesetsOpts, ) -> Changeset
Add changes from multiple changesets using git octopus merge strategy This is more efficient than chaining multiple withChangeset calls when merging many changesets. Only FAIL and FAIL_EARLY conflict strategies are supported (octopus merge cannot use -X ours/theirs).
§Arguments
changes- List of changesets to merge into the actual changesetopt- optional argument, see inner type for documentation, use_opts to use