pub struct FileTree { /* private fields */ }Expand description
The materialized /filetree view — see the module docs. Construct
via FileTree::laboratory or FileTree::daemon. Dropping it
aborts the background pump.
Implementations§
Source§impl FileTree
impl FileTree
Sourcepub fn laboratory(base_url: impl Into<String>) -> FileTreeBuilder
pub fn laboratory(base_url: impl Into<String>) -> FileTreeBuilder
Build a FileTree against a laboratory MCP’s own /filetree
endpoint, from its base HTTP address (e.g.
http://127.0.0.1:<port> — the loopback-published container
port). No auth — the port itself is the trust boundary.
Sourcepub fn daemon(
base_url: impl Into<String>,
laboratory_id: impl AsRef<str>,
) -> FileTreeBuilder
pub fn daemon( base_url: impl Into<String>, laboratory_id: impl AsRef<str>, ) -> FileTreeBuilder
Build a FileTree against a CLI daemon’s
/laboratories/{id}/filetree endpoint, from the daemon’s
published http:// address and the RAW laboratory id (ids
forbid /, so the URL is safe by construction). Same wire
contract as the laboratory variant — the daemon re-emits the
identical events from its own materialized state. Attach
signature against a secretful
daemon and host to pin the exact
serving host.
Sourcepub async fn tree(&self) -> Vec<FileTreeNode>
pub async fn tree(&self) -> Vec<FileTreeNode>
Snapshot the current tree — the watched root’s child nodes. Empty before the first snapshot has been folded.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FileTree
impl !UnwindSafe for FileTree
impl Freeze for FileTree
impl Send for FileTree
impl Sync for FileTree
impl Unpin for FileTree
impl UnsafeUnpin for FileTree
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> 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