pub struct HostFileSystem { /* private fields */ }Expand description
A FileSystem handed to the library.
Owns both the boxed trait object and the C++ subclass that forwards into it, so it must outlive every library call that uses it.
Implementations§
Source§impl HostFileSystem
impl HostFileSystem
pub fn new<F: FileSystem + 'static>(fs: F) -> Self
Sourcepub fn as_ptr(&self) -> *mut c_void
pub fn as_ptr(&self) -> *mut c_void
Raw interfaces::VirtualPathFileSystem*, for library calls that
take one.
Sourcepub fn read_through_native(&self, path: &str) -> Option<Vec<u8>>
pub fn read_through_native(&self, path: &str) -> Option<Vec<u8>>
Read back through the C++ interface — the path library code takes.
pub fn exists_through_native(&self, path: &str) -> bool
Trait Implementations§
Source§impl Debug for HostFileSystem
impl Debug for HostFileSystem
Source§impl Drop for HostFileSystem
impl Drop for HostFileSystem
impl Send for HostFileSystem
impl Sync for HostFileSystem
Auto Trait Implementations§
impl !RefUnwindSafe for HostFileSystem
impl !UnwindSafe for HostFileSystem
impl Freeze for HostFileSystem
impl Unpin for HostFileSystem
impl UnsafeUnpin for HostFileSystem
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