Skip to main content

TurboTasksBackend

Struct TurboTasksBackend 

Source
pub struct TurboTasksBackend<B: BackingStorage>(/* private fields */);

Implementations§

Source§

impl<B: BackingStorage> TurboTasksBackend<B>

Source

pub fn new(options: BackendOptions, backing_storage: B) -> Self

Source

pub fn backing_storage(&self) -> &B

Trait Implementations§

Source§

impl<B: BackingStorage> Backend for TurboTasksBackend<B>

Source§

type BackendJob = TurboTasksBackendJob

Source§

fn startup(&self, turbo_tasks: &dyn TurboTasksBackendApi<Self>)

Source§

fn stopping(&self, _turbo_tasks: &dyn TurboTasksBackendApi<Self>)

Source§

fn stop(&self, turbo_tasks: &dyn TurboTasksBackendApi<Self>)

Source§

fn idle_start(&self, turbo_tasks: &dyn TurboTasksBackendApi<Self>)

Source§

fn idle_end(&self, _turbo_tasks: &dyn TurboTasksBackendApi<Self>)

Source§

fn get_or_create_persistent_task( &self, task_type: CachedTaskType, parent_task: Option<TaskId>, turbo_tasks: &dyn TurboTasksBackendApi<Self>, ) -> TaskId

Source§

fn get_or_create_transient_task( &self, task_type: CachedTaskType, parent_task: Option<TaskId>, turbo_tasks: &dyn TurboTasksBackendApi<Self>, ) -> TaskId

Source§

fn invalidate_task( &self, task_id: TaskId, turbo_tasks: &dyn TurboTasksBackendApi<Self>, )

Source§

fn invalidate_tasks( &self, tasks: &[TaskId], turbo_tasks: &dyn TurboTasksBackendApi<Self>, )

Source§

fn invalidate_tasks_set( &self, tasks: &AutoSet<TaskId, BuildHasherDefault<FxHasher>, 2>, turbo_tasks: &dyn TurboTasksBackendApi<Self>, )

Source§

fn invalidate_serialization( &self, task_id: TaskId, turbo_tasks: &dyn TurboTasksBackendApi<Self>, )

Source§

fn task_execution_canceled( &self, task: TaskId, turbo_tasks: &dyn TurboTasksBackendApi<Self>, )

Source§

fn try_start_task_execution( &self, task_id: TaskId, priority: TaskPriority, turbo_tasks: &dyn TurboTasksBackendApi<Self>, ) -> Option<TaskExecutionSpec<'_>>

Source§

fn task_execution_completed( &self, task_id: TaskId, result: Result<RawVc, TurboTasksExecutionError>, cell_counters: &AutoMap<ValueTypeId, u32, BuildHasherDefault<FxHasher>, 8>, has_invalidator: bool, turbo_tasks: &dyn TurboTasksBackendApi<Self>, ) -> bool

Source§

fn run_backend_job<'a>( &'a self, job: Self::BackendJob, turbo_tasks: &'a dyn TurboTasksBackendApi<Self>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>

Source§

fn try_read_task_output( &self, task_id: TaskId, reader: Option<TaskId>, options: ReadOutputOptions, turbo_tasks: &dyn TurboTasksBackendApi<Self>, ) -> Result<Result<RawVc, EventListener>>

INVALIDATION: Be careful with this, when reader is None, it will not track dependencies, so using it could break cache invalidation.
Source§

fn try_read_task_cell( &self, task_id: TaskId, cell: CellId, reader: Option<TaskId>, options: ReadCellOptions, turbo_tasks: &dyn TurboTasksBackendApi<Self>, ) -> Result<Result<TypedCellContent, EventListener>>

INVALIDATION: Be careful with this, when reader is None, it will not track dependencies, so using it could break cache invalidation.
Source§

fn try_read_own_task_cell( &self, task_id: TaskId, cell: CellId, options: ReadCellOptions, turbo_tasks: &dyn TurboTasksBackendApi<Self>, ) -> Result<TypedCellContent>

INVALIDATION: Be careful with this, it will not track dependencies, so using it could break cache invalidation.
Source§

fn read_task_collectibles( &self, task_id: TaskId, collectible_type: TraitTypeId, reader: Option<TaskId>, turbo_tasks: &dyn TurboTasksBackendApi<Self>, ) -> AutoMap<RawVc, i32, BuildHasherDefault<FxHasher>, 1>

INVALIDATION: Be careful with this, when reader is None, it will not track dependencies, so using it could break cache invalidation.
Source§

fn emit_collectible( &self, collectible_type: TraitTypeId, collectible: RawVc, task_id: TaskId, turbo_tasks: &dyn TurboTasksBackendApi<Self>, )

Source§

fn unemit_collectible( &self, collectible_type: TraitTypeId, collectible: RawVc, count: u32, task_id: TaskId, turbo_tasks: &dyn TurboTasksBackendApi<Self>, )

Source§

fn update_task_cell( &self, task_id: TaskId, cell: CellId, is_serializable_cell_content: bool, content: CellContent, updated_key_hashes: Option<SmallVec<[u64; 2]>>, verification_mode: VerificationMode, turbo_tasks: &dyn TurboTasksBackendApi<Self>, )

Source§

fn mark_own_task_as_finished( &self, task_id: TaskId, turbo_tasks: &dyn TurboTasksBackendApi<Self>, )

Source§

fn mark_own_task_as_session_dependent( &self, task: TaskId, turbo_tasks: &dyn TurboTasksBackendApi<Self>, )

Source§

fn connect_task( &self, task: TaskId, parent_task: Option<TaskId>, turbo_tasks: &dyn TurboTasksBackendApi<Self>, )

Source§

fn create_transient_task( &self, task_type: TransientTaskType, _turbo_tasks: &dyn TurboTasksBackendApi<Self>, ) -> TaskId

Source§

fn dispose_root_task( &self, task_id: TaskId, turbo_tasks: &dyn TurboTasksBackendApi<Self>, )

Source§

fn task_statistics(&self) -> &TaskStatisticsApi

Source§

fn is_tracking_dependencies(&self) -> bool

Source§

fn get_task_name( &self, task: TaskId, turbo_tasks: &dyn TurboTasksBackendApi<Self>, ) -> String

Returns a human-readable name for the given task. Used by error display formatting to lazily resolve task names instead of storing them eagerly in error objects.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
§

impl<T> Pointee for T

§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more