pub struct FileEntry { /* private fields */ }Expand description
A file in the virtual filesystem.
Contains file content as a string and metadata.
§Examples
use mcp_execution_files::FileEntry;
let file = FileEntry::new("console.log('hello');");
assert_eq!(file.content(), "console.log('hello');");
assert_eq!(file.size(), 21);Implementations§
Source§impl FileEntry
impl FileEntry
Sourcepub fn new(content: impl Into<String>) -> Self
pub fn new(content: impl Into<String>) -> Self
Creates a new VFS file with the given content.
§Examples
use mcp_execution_files::FileEntry;
let file = FileEntry::new("export const VERSION = '1.0';");
assert_eq!(file.size(), 29);Trait Implementations§
impl Eq for FileEntry
impl StructuralPartialEq for FileEntry
Auto Trait Implementations§
impl Freeze for FileEntry
impl RefUnwindSafe for FileEntry
impl Send for FileEntry
impl Sync for FileEntry
impl Unpin for FileEntry
impl UnwindSafe for FileEntry
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
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
Compare self to
key and return true if they are equal.