pub struct WorkspaceLease {
pub input_workspace_generation: String,
pub leased_input_hash: String,
pub read_paths: BTreeSet<String>,
pub write_paths: BTreeSet<String>,
}Expand description
Read/write scope delegated from one immutable parent workspace generation.
Fields§
§input_workspace_generation: StringParent workspace generation observed before the child workspace was created.
leased_input_hash: StringDigest of the material copied into the isolated child workspace.
read_paths: BTreeSet<String>Normalized workspace-relative paths visible to the child.
write_paths: BTreeSet<String>Normalized workspace-relative paths the child may change.
Implementations§
Source§impl WorkspaceLease
impl WorkspaceLease
Sourcepub fn validate(&self) -> Result<(), AgentError>
pub fn validate(&self) -> Result<(), AgentError>
Validates digests and requires every write scope to be contained by a read scope.
Sourcepub fn permits_read(&self, path: &str) -> bool
pub fn permits_read(&self, path: &str) -> bool
Returns whether a normalized path is visible to the child.
Sourcepub fn permits_write(&self, path: &str) -> bool
pub fn permits_write(&self, path: &str) -> bool
Returns whether a normalized path may be changed by the child.
Trait Implementations§
Source§impl Clone for WorkspaceLease
impl Clone for WorkspaceLease
Source§fn clone(&self) -> WorkspaceLease
fn clone(&self) -> WorkspaceLease
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 moreSource§impl Debug for WorkspaceLease
impl Debug for WorkspaceLease
Source§impl<'de> Deserialize<'de> for WorkspaceLease
impl<'de> Deserialize<'de> for WorkspaceLease
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 WorkspaceLease
Source§impl PartialEq for WorkspaceLease
impl PartialEq for WorkspaceLease
Source§impl Serialize for WorkspaceLease
impl Serialize for WorkspaceLease
impl StructuralPartialEq for WorkspaceLease
Auto Trait Implementations§
impl Freeze for WorkspaceLease
impl RefUnwindSafe for WorkspaceLease
impl Send for WorkspaceLease
impl Sync for WorkspaceLease
impl Unpin for WorkspaceLease
impl UnsafeUnpin for WorkspaceLease
impl UnwindSafe for WorkspaceLease
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