pub struct FakeFiles;Expand description
A canned file store for --fake mode and tests.
Trait Implementations§
Source§impl FileStore for FakeFiles
impl FileStore for FakeFiles
Source§fn list(&self, _dir: &str) -> Result<Vec<FileEntry>, String>
fn list(&self, _dir: &str) -> Result<Vec<FileEntry>, String>
List a directory (with dir/size info).
Source§fn upload(&self, _remote_path: &str, _local: &Path) -> Result<(), String>
fn upload(&self, _remote_path: &str, _local: &Path) -> Result<(), String>
Upload the already-staged
local file to remote_path.Source§fn thumbnail(
&self,
_remote_path: &str,
_plate: u32,
) -> Result<Option<Vec<u8>>, String>
fn thumbnail( &self, _remote_path: &str, _plate: u32, ) -> Result<Option<Vec<u8>>, String>
The embedded plate preview PNG for a sliced
.3mf (Metadata/plate_N.png),
or None when the file has no such thumbnail.Source§fn fetch(&self, _remote_path: &str) -> Result<Vec<u8>, String>
fn fetch(&self, _remote_path: &str) -> Result<Vec<u8>, String>
Fetch a file’s raw bytes (for the 3D viewer). Capped at
RAW_MAX.Source§fn gcode(
&self,
_remote_path: &str,
_plate: u32,
) -> Result<Option<Vec<u8>>, String>
fn gcode( &self, _remote_path: &str, _plate: u32, ) -> Result<Option<Vec<u8>>, String>
Extract the plate’s gcode (
Metadata/plate_N.gcode) from a .3mf — the
toolpath the 3D viewer renders for a sliced file. None if absent.Source§fn models(&self, _remote_path: &str) -> Result<Vec<String>, String>
fn models(&self, _remote_path: &str) -> Result<Vec<String>, String>
Extract the object mesh model XML(s) from a
.3mf — the geometry the 3D
viewer renders as a solid mesh. Bambu stores meshes in external component
files (3D/Objects/*.model) that three’s 3MF loader won’t follow, so we
pull them out ourselves. Empty when the file embeds no mesh.Auto Trait Implementations§
impl Freeze for FakeFiles
impl RefUnwindSafe for FakeFiles
impl Send for FakeFiles
impl Sync for FakeFiles
impl Unpin for FakeFiles
impl UnsafeUnpin for FakeFiles
impl UnwindSafe for FakeFiles
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