pub trait FileSystem:
ValueToString
+ Send
+ Sync
+ NonLocalValue
+ ValueDebug {
// Required methods
fn read(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<FileContent>
where Self: Sized;
fn read_link(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<LinkContent>
where Self: Sized;
fn raw_read_dir(
self: Vc<Self>,
fs_path: FileSystemPath,
) -> Vc<RawDirectoryContent>
where Self: Sized;
fn write(
self: Vc<Self>,
fs_path: FileSystemPath,
content: Vc<FileContent>,
) -> Vc<()>
where Self: Sized;
fn write_link(
self: Vc<Self>,
fs_path: FileSystemPath,
target: Vc<LinkContent>,
) -> Vc<()>
where Self: Sized;
fn metadata(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<FileMeta>
where Self: Sized;
// Provided method
fn root(self: Vc<Self>) -> Vc<FileSystemPath>
where Self: Sized { ... }
}Required Methods§
fn read(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<FileContent>where
Self: Sized,
fn read_link(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<LinkContent>where
Self: Sized,
fn raw_read_dir(
self: Vc<Self>,
fs_path: FileSystemPath,
) -> Vc<RawDirectoryContent>where
Self: Sized,
fn write(
self: Vc<Self>,
fs_path: FileSystemPath,
content: Vc<FileContent>,
) -> Vc<()>where
Self: Sized,
Sourcefn write_link(
self: Vc<Self>,
fs_path: FileSystemPath,
target: Vc<LinkContent>,
) -> Vc<()>where
Self: Sized,
fn write_link(
self: Vc<Self>,
fs_path: FileSystemPath,
target: Vc<LinkContent>,
) -> Vc<()>where
Self: Sized,
fn metadata(self: Vc<Self>, fs_path: FileSystemPath) -> Vc<FileMeta>where
Self: Sized,
Provided Methods§
Sourcefn root(self: Vc<Self>) -> Vc<FileSystemPath>where
Self: Sized,
fn root(self: Vc<Self>) -> Vc<FileSystemPath>where
Self: Sized,
Returns the path to the root of the file system.
Trait Implementations§
Source§impl TraitVtablePrototype for Box<dyn FileSystem>
impl TraitVtablePrototype for Box<dyn FileSystem>
Source§impl VcValueTrait for Box<dyn FileSystem>
impl VcValueTrait for Box<dyn FileSystem>
Source§const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>
const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>
The per-trait vtable registry, populated at program load by
#[ctor::ctor]
functions emitted by each #[turbo_tasks::value_impl] expansion. Read moretype ValueTrait = dyn FileSystem
Source§fn get_trait_type_id() -> TraitTypeId
fn get_trait_type_id() -> TraitTypeId
Returns the type id of the trait object.
impl Dynamic<Box<dyn FileSystem>> for Box<dyn FileSystem>
impl Dynamic<Box<dyn ValueDebug>> for Box<dyn FileSystem>
Available on debug-assertions enabled only.
impl Dynamic<Box<dyn ValueToString>> for Box<dyn FileSystem>
impl Upcast<Box<dyn FileSystem>> for Box<dyn FileSystem>
impl Upcast<Box<dyn ValueDebug>> for Box<dyn FileSystem>
Available on debug-assertions enabled only.
impl Upcast<Box<dyn ValueToString>> for Box<dyn FileSystem>
impl UpcastStrict<Box<dyn ValueDebug>> for Box<dyn FileSystem>
Available on debug-assertions enabled only.