pub struct SessionWorkingDirectoryReplacedAction {
pub directory: Uri,
pub replacement: Uri,
}Expand description
Atomically replaces one of the session’s working directories.
This is a targeted compare-and-swap: the reducer is a no-op when
{@link SessionState.workingDirectories} does not contain directory.
Otherwise it replaces that entry with replacement and deduplicates the
result, preserving every other directory’s relative order. When
replacement occurs after the target, it moves to the target’s position;
for example, [A, B, C] with B → C becomes [A, C]. When it occurs
before the target, it retains its earlier position and the target is removed;
[A, B, C] with C → A becomes [A, B].
Only valid when the agent advertises
{@link AgentCapabilities.multipleWorkingDirectories}. Replacing index 0
additionally requires
{@link MultipleWorkingDirectoriesCapability.primaryReplacement}; clients
MUST NOT target an immutable primary. The host MUST validate and apply its
backend side effect before broadcasting an accepted action, or reject it.
Fields§
§directory: UriURI of the existing entry to replace.
replacement: UriURI to place in the replaced entry’s position.
Trait Implementations§
Source§impl Clone for SessionWorkingDirectoryReplacedAction
impl Clone for SessionWorkingDirectoryReplacedAction
Source§fn clone(&self) -> SessionWorkingDirectoryReplacedAction
fn clone(&self) -> SessionWorkingDirectoryReplacedAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more