Struct VcStorage

Source
pub struct VcStorage { /* private fields */ }

Implementations§

Source§

impl VcStorage

Source

pub fn with<T>(f: impl Future<Output = T>) -> impl Future<Output = T>

Trait Implementations§

Source§

impl Default for VcStorage

Source§

fn default() -> VcStorage

Returns the “default value” for a type. Read more
Source§

impl TurboTasksApi for VcStorage

Source§

fn subscribe_to_compilation_events( &self, _event_types: Option<Vec<String>>, ) -> Receiver<Arc<dyn CompilationEvent>>

Should not be called on the testing VcStorage. These methods are only implemented for structs with access to a MessageQueue like TurboTasks.

Source§

fn send_compilation_event(&self, _event: Arc<dyn CompilationEvent>)

Should not be called on the testing VcStorage. These methods are only implemented for structs with access to a MessageQueue like TurboTasks.

Source§

fn pin(&self) -> Arc<dyn TurboTasksApi>

Source§

fn invalidate(&self, _task: TaskId)

Source§

fn invalidate_with_reason( &self, _task: TaskId, _reason: StaticOrArc<dyn InvalidationReason>, )

Source§

fn invalidate_serialization(&self, _task: TaskId)

Source§

fn notify_scheduled_tasks(&self)

Eagerly notifies all tasks that were scheduled for notifications via schedule_notify_tasks_set()
Source§

fn try_read_task_output( &self, id: TaskId, _consistency: ReadConsistency, ) -> Result<Result<RawVc, EventListener>>

Source§

fn try_read_task_output_untracked( &self, task: TaskId, consistency: ReadConsistency, ) -> Result<Result<RawVc, EventListener>>

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

fn try_read_task_cell( &self, task: TaskId, index: CellId, _options: ReadCellOptions, ) -> Result<Result<TypedCellContent, EventListener>>

Source§

fn try_read_task_cell_untracked( &self, task: TaskId, index: CellId, _options: ReadCellOptions, ) -> Result<Result<TypedCellContent, EventListener>>

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

fn try_read_own_task_cell_untracked( &self, current_task: TaskId, index: CellId, options: ReadCellOptions, ) -> Result<TypedCellContent>

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

fn try_read_local_output( &self, _execution_id: ExecutionId, _local_task_id: LocalTaskId, ) -> Result<Result<RawVc, EventListener>>

Reads a [RawVc::LocalOutput]. If the task has completed, returns the [RawVc] the local task points to. Read more
Source§

fn emit_collectible(&self, _trait_type: TraitTypeId, _collectible: RawVc)

Source§

fn unemit_collectible( &self, _trait_type: TraitTypeId, _collectible: RawVc, _count: u32, )

Source§

fn unemit_collectibles( &self, _trait_type: TraitTypeId, _collectibles: &TaskCollectiblesMap, )

Source§

fn read_task_collectibles( &self, _task: TaskId, _trait_id: TraitTypeId, ) -> TaskCollectiblesMap

Source§

fn read_own_task_cell( &self, task: TaskId, index: CellId, _options: ReadCellOptions, ) -> Result<TypedCellContent>

Source§

fn update_own_task_cell( &self, task: TaskId, index: CellId, content: CellContent, )

Source§

fn connect_task(&self, _task: TaskId)

Source§

fn mark_own_task_as_finished(&self, _task: TaskId)

Source§

fn mark_own_task_as_session_dependent(&self, _task: TaskId)

Source§

fn set_own_task_aggregation_number( &self, _task: TaskId, _aggregation_number: u32, )

Source§

fn detached_for_testing( &self, _f: Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>>

Wraps the given future in the current task. Read more
Source§

fn task_statistics(&self) -> &TaskStatisticsApi

Source§

fn stop_and_wait(&self) -> Pin<Box<dyn Future<Output = ()> + Send + 'static>>

Source§

impl TurboTasksCallApi for VcStorage

Source§

fn dynamic_call( &self, func: FunctionId, this: Option<RawVc>, arg: Box<dyn MagicAny>, _persistence: TaskPersistence, ) -> RawVc

Calls a native function with arguments. Resolves arguments when needed with a wrapper task.
Source§

fn native_call( &self, _func: FunctionId, _this: Option<RawVc>, _arg: Box<dyn MagicAny>, _persistence: TaskPersistence, ) -> RawVc

Call a native function with arguments. All inputs must be resolved.
Source§

fn trait_call( &self, _trait_type: TraitTypeId, _trait_fn_name: Cow<'static, str>, _this: RawVc, _arg: Box<dyn MagicAny>, _persistence: TaskPersistence, ) -> RawVc

Calls a trait method with arguments. First input is the self object. Uses a wrapper task to resolve
Source§

fn run_once( &self, _future: Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>>, ) -> TaskId

Source§

fn run_once_with_reason( &self, _reason: StaticOrArc<dyn InvalidationReason>, _future: Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>>, ) -> TaskId

Source§

fn run_once_process( &self, _future: Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>>, ) -> TaskId

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> Any for T
where T: Any,

§

fn get_type_id(&self) -> TypeId

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

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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