pub struct DeclaredExport {
pub declared_root: String,
pub root: PathBuf,
pub mode: ExportMode,
pub max_bytes: u64,
}Expand description
One exports.files block, with its root already resolved against the session’s accessible
workdir.
The root is joined, not canonicalised, at construction: exports.files.root is not required
to exist when the capsule launches, because the agent may create it during a task. Every
request canonicalises it afresh, which is also what lets a list answer 200 with no entries
before the agent has written anything.
Fields§
§declared_root: Stringexports.files.root verbatim, as the operator wrote it (out/). Echoed in every
response and every trace line; never used to touch the filesystem.
root: PathBufaccessible_workdir.join(declared_root).
mode: ExportMode§max_bytes: u64Per-file read ceiling. A file above it is still listed, with its real size — discovery must not lie about what is there — and refused on read.
Implementations§
Source§impl DeclaredExport
impl DeclaredExport
Sourcepub fn resolve(accessible_workdir: &Path, export: &FileExport) -> Self
pub fn resolve(accessible_workdir: &Path, export: &FileExport) -> Self
Resolves a manifest’s exports.files block against the session’s accessible workdir —
the directory the agent’s own tools see at ., and therefore the one out/result.txt
means. Not StagedSession::workdir, which is the internal .murmur/<session_id>
bookkeeping directory when --workdir is given, and holds trace.jsonl.
Sourcepub fn for_peer_files(
accessible_workdir: &Path,
export: &PeerFilesExport,
) -> Self
pub fn for_peer_files( accessible_workdir: &Path, export: &PeerFilesExport, ) -> Self
Self::resolve for the peer plane’s separate subtree.
The same type because it is the same resolution: exports.peer_files opens a different
root under a different authoriser, but a path beneath it is decided by exactly the rules
that decide one beneath exports.files. mode is ExportMode::ReadOnly because there
is no other kind of peer export and none is declarable — a redeem serves bytes and
nothing else.
Trait Implementations§
Source§impl Clone for DeclaredExport
impl Clone for DeclaredExport
Source§impl Debug for DeclaredExport
impl Debug for DeclaredExport
impl Eq for DeclaredExport
Source§impl PartialEq for DeclaredExport
impl PartialEq for DeclaredExport
impl StructuralPartialEq for DeclaredExport
Auto Trait Implementations§
impl Freeze for DeclaredExport
impl RefUnwindSafe for DeclaredExport
impl Send for DeclaredExport
impl Sync for DeclaredExport
impl Unpin for DeclaredExport
impl UnsafeUnpin for DeclaredExport
impl UnwindSafe for DeclaredExport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more