pub struct SimulatedStoreIO {
pub(crate) store_dir: String,
pub(crate) passthru_paths: RefCell<HashMap<[u8; 20], PathBuf>>,
}Fields§
§store_dir: String§passthru_paths: RefCell<HashMap<[u8; 20], PathBuf>>Implementations§
Source§impl SimulatedStoreIO
impl SimulatedStoreIO
Sourcepub(crate) fn to_readable_path<'a>(
&self,
path: &'a Path,
) -> Result<Cow<'a, Path>>
pub(crate) fn to_readable_path<'a>( &self, path: &'a Path, ) -> Result<Cow<'a, Path>>
Returns a path from which StdIO can read, unless realisation is required (which the simulated store does not support).
pub fn import_path_by_entries<I, E>( &self, name: &str, entries: I, expected_sha256: Option<[u8; 32]>, ) -> Result<StorePath<String>>
Trait Implementations§
Source§impl Default for SimulatedStoreIO
impl Default for SimulatedStoreIO
Source§impl EvalIO for SimulatedStoreIO
impl EvalIO for SimulatedStoreIO
Source§fn store_dir(&self) -> Option<String>
fn store_dir(&self) -> Option<String>
Returns the root of the store directory, if such a thing
exists in the evaluation context. Read more
Source§fn import_path(&self, path: &Path) -> Result<PathBuf>
fn import_path(&self, path: &Path) -> Result<PathBuf>
Import the given path. What this means depends on the implementation,
for example for a
std::io-based implementation this might be a no-op,
while for a Tvix store this might be a copy of the given files to the
store. Read moreSource§fn path_exists(&self, path: &Path) -> Result<bool>
fn path_exists(&self, path: &Path) -> Result<bool>
Verify whether the file at the specified path exists. Read more
Source§fn open(&self, path: &Path) -> Result<Box<dyn Read>>
fn open(&self, path: &Path) -> Result<Box<dyn Read>>
Open the file at the specified path to a
io::Read.Auto Trait Implementations§
impl !Freeze for SimulatedStoreIO
impl !RefUnwindSafe for SimulatedStoreIO
impl Send for SimulatedStoreIO
impl !Sync for SimulatedStoreIO
impl Unpin for SimulatedStoreIO
impl UnwindSafe for SimulatedStoreIO
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> 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>
Converts
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>
Converts
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