Struct starlark::values::tuple::AllocTuple
source · pub struct AllocTuple<T>(pub T);
Expand description
Utility to allocate a tuple.
Note, for tuples of fixed sizes there are implementations for (A,)
or (A, B)
.
§Example
let l = heap.alloc(AllocTuple([1, 2, 3]));
let ls = frozen_heap.alloc(AllocTuple([1, 2, 3]));
Tuple Fields§
§0: T
Implementations§
source§impl AllocTuple<Empty<FrozenValue>>
impl AllocTuple<Empty<FrozenValue>>
sourcepub const EMPTY: AllocTuple<Empty<FrozenValue>> = _
pub const EMPTY: AllocTuple<Empty<FrozenValue>> = _
Allocate an empty tuple.
Trait Implementations§
source§impl<T> AllocFrozenValue for AllocTuple<T>
impl<T> AllocFrozenValue for AllocTuple<T>
source§fn alloc_frozen_value(self, heap: &FrozenHeap) -> FrozenValue
fn alloc_frozen_value(self, heap: &FrozenHeap) -> FrozenValue
Allocate a value in the frozen heap and return a reference to the allocated value.
source§impl<'v, T> AllocValue<'v> for AllocTuple<T>
impl<'v, T> AllocValue<'v> for AllocTuple<T>
source§impl<T> StarlarkTypeRepr for AllocTuple<T>
impl<T> StarlarkTypeRepr for AllocTuple<T>
source§fn starlark_type_repr() -> Ty
fn starlark_type_repr() -> Ty
The representation of a type that a user would use verbatim in starlark type annotations
Auto Trait Implementations§
impl<T> RefUnwindSafe for AllocTuple<T>where
T: RefUnwindSafe,
impl<T> Send for AllocTuple<T>where
T: Send,
impl<T> Sync for AllocTuple<T>where
T: Sync,
impl<T> Unpin for AllocTuple<T>where
T: Unpin,
impl<T> UnwindSafe for AllocTuple<T>where
T: UnwindSafe,
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