pub struct VcDefaultRead<T> { /* private fields */ }
Expand description
Representation for standard #[turbo_tasks::value]
, where a read return a
reference to the value type[]
Trait Implementations§
Source§impl<T> VcRead<T> for VcDefaultRead<T>where
T: VcValueType,
impl<T> VcRead<T> for VcDefaultRead<T>where
T: VcValueType,
Source§type Target = T
type Target = T
The read target type. This is the type that will be returned when
.await
ing a Vc
of a value type. Read moreSource§type Repr = T
type Repr = T
The representation type. This is what will be used to
serialize/deserialize the value, and this determines the
type that the value will be upcasted to for storage. Read more
Source§fn value_to_target_ref(value: &T) -> &Self::Target
fn value_to_target_ref(value: &T) -> &Self::Target
Convert a reference to a value to a reference to the target type.
Source§fn value_to_target(value: T) -> Self::Target
fn value_to_target(value: T) -> Self::Target
Convert a value to the target type.
Source§fn value_to_repr(value: T) -> Self::Repr
fn value_to_repr(value: T) -> Self::Repr
Convert the value type to the repr.
Source§fn target_to_value(target: Self::Target) -> T
fn target_to_value(target: Self::Target) -> T
Convert the target type to the value.
Source§fn target_to_value_ref(target: &Self::Target) -> &T
fn target_to_value_ref(target: &Self::Target) -> &T
Convert a reference to a target type to a reference to a value.
Source§fn target_to_value_mut_ref(target: &mut Self::Target) -> &mut T
fn target_to_value_mut_ref(target: &mut Self::Target) -> &mut T
Convert a mutable reference to a target type to a reference to a value.
Source§fn target_to_repr(target: Self::Target) -> Self::Repr
fn target_to_repr(target: Self::Target) -> Self::Repr
Convert the target type to the repr.
Source§fn repr_to_value_ref(repr: &Self::Repr) -> &T
fn repr_to_value_ref(repr: &Self::Repr) -> &T
Convert a reference to a repr type to a reference to a value.
Auto Trait Implementations§
impl<T> Freeze for VcDefaultRead<T>
impl<T> RefUnwindSafe for VcDefaultRead<T>where
T: RefUnwindSafe,
impl<T> Send for VcDefaultRead<T>where
T: Send,
impl<T> Sync for VcDefaultRead<T>where
T: Sync,
impl<T> Unpin for VcDefaultRead<T>where
T: Unpin,
impl<T> UnwindSafe for VcDefaultRead<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<T> Any for Twhere
T: Any,
impl<T> Any for Twhere
T: Any,
fn get_type_id(&self) -> TypeId
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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