pub struct BuildState {
pub blob_service: Arc<dyn BlobService>,
pub directory_service: Arc<dyn DirectoryService>,
pub path_info_service: Arc<dyn PathInfoService>,
pub nar_calculation_service: Arc<dyn NarCalculationService>,
build_service: Arc<dyn BuildService>,
pub fetcher: Fetcher<Arc<dyn BlobService>, Arc<dyn DirectoryService>, Arc<dyn PathInfoService>, Arc<dyn NarCalculationService>>,
pub known_paths: RefCell<KnownPaths>,
}Fields§
§blob_service: Arc<dyn BlobService>§directory_service: Arc<dyn DirectoryService>§path_info_service: Arc<dyn PathInfoService>§nar_calculation_service: Arc<dyn NarCalculationService>§build_service: Arc<dyn BuildService>§fetcher: Fetcher<Arc<dyn BlobService>, Arc<dyn DirectoryService>, Arc<dyn PathInfoService>, Arc<dyn NarCalculationService>>§known_paths: RefCell<KnownPaths>Implementations§
Source§impl BuildState
impl BuildState
pub fn new( blob_service: Arc<dyn BlobService>, directory_service: Arc<dyn DirectoryService>, path_info_service: Arc<dyn PathInfoService>, nar_calculation_service: Arc<dyn NarCalculationService>, build_service: Arc<dyn BuildService>, hashed_mirrors: Vec<Url>, ) -> Self
Sourcepub async fn store_path_to_path_info(
&self,
store_path: &StorePathRef<'_>,
sub_path: &Path,
) -> Result<Option<PathInfo>>
pub async fn store_path_to_path_info( &self, store_path: &StorePathRef<'_>, sub_path: &Path, ) -> Result<Option<PathInfo>>
for a given [StorePath] and additional [snix_castore::Path] inside the store path,
look up the [PathInfo], and if it exists, and then uses
[descend_to] to return the [snix_castore::Node] specified by sub_path.
In case there is no PathInfo yet, we check “self.known_paths” (learnt by the evaluator)
- If there’s a fetch, we do that and return the resulting PathInfo.
- If there’s a Derivation, we build it and return the resulting PathInfo. To build it, we need to do a function call to ourselves with all inputs of that Derivation, which will trigger fetches / builds of inputs, recursively.
This should be replaced with a proper scheduler knowing about a partial subgraph at some point, because this design doesn’t allow concurrent builds yet.
Auto Trait Implementations§
impl !Freeze for BuildState
impl !RefUnwindSafe for BuildState
impl Send for BuildState
impl !Sync for BuildState
impl Unpin for BuildState
impl UnsafeUnpin for BuildState
impl !UnwindSafe for BuildState
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].