Struct starlark::values::list::UnpackList
source · pub struct UnpackList<T> {
pub items: Vec<T>,
}
Expand description
Unpack a value of type list<T>
into a vec.
Fields§
§items: Vec<T>
Unpacked items.
Trait Implementations§
source§impl<T: Clone> Clone for UnpackList<T>
impl<T: Clone> Clone for UnpackList<T>
source§fn clone(&self) -> UnpackList<T>
fn clone(&self) -> UnpackList<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug> Debug for UnpackList<T>
impl<T: Debug> Debug for UnpackList<T>
source§impl<T: Default> Default for UnpackList<T>
impl<T: Default> Default for UnpackList<T>
source§fn default() -> UnpackList<T>
fn default() -> UnpackList<T>
Returns the “default value” for a type. Read more
source§impl<T: Hash> Hash for UnpackList<T>
impl<T: Hash> Hash for UnpackList<T>
source§impl<'a, T> IntoIterator for &'a UnpackList<T>
impl<'a, T> IntoIterator for &'a UnpackList<T>
source§impl<'a, T> IntoIterator for &'a mut UnpackList<T>
impl<'a, T> IntoIterator for &'a mut UnpackList<T>
source§impl<T> IntoIterator for UnpackList<T>
impl<T> IntoIterator for UnpackList<T>
source§impl<T: Ord> Ord for UnpackList<T>
impl<T: Ord> Ord for UnpackList<T>
source§fn cmp(&self, other: &UnpackList<T>) -> Ordering
fn cmp(&self, other: &UnpackList<T>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq> PartialEq for UnpackList<T>
impl<T: PartialEq> PartialEq for UnpackList<T>
source§fn eq(&self, other: &UnpackList<T>) -> bool
fn eq(&self, other: &UnpackList<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: PartialOrd> PartialOrd for UnpackList<T>
impl<T: PartialOrd> PartialOrd for UnpackList<T>
source§fn partial_cmp(&self, other: &UnpackList<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &UnpackList<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<T: StarlarkTypeRepr> StarlarkTypeRepr for UnpackList<T>
impl<T: StarlarkTypeRepr> StarlarkTypeRepr for UnpackList<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
source§impl<'v, T: UnpackValue<'v>> UnpackValue<'v> for UnpackList<T>
impl<'v, T: UnpackValue<'v>> UnpackValue<'v> for UnpackList<T>
source§fn unpack_value(value: Value<'v>) -> Option<Self>
fn unpack_value(value: Value<'v>) -> Option<Self>
Given a
Value
, try and unpack it into the given type, which may involve some element of conversion.source§fn unpack_value_err(value: Value<'v>) -> Result<Self>
fn unpack_value_err(value: Value<'v>) -> Result<Self>
Unpack a value, but return error instead of
None
if unpacking fails.source§fn unpack_param(value: Value<'v>) -> Result<Self>
fn unpack_param(value: Value<'v>) -> Result<Self>
Unpack value, but instead of
None
return error about incorrect argument type.impl<T: Eq> Eq for UnpackList<T>
impl<T> StructuralPartialEq for UnpackList<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for UnpackList<T>where
T: RefUnwindSafe,
impl<T> Send for UnpackList<T>where
T: Send,
impl<T> Sync for UnpackList<T>where
T: Sync,
impl<T> Unpin for UnpackList<T>where
T: Unpin,
impl<T> UnwindSafe for UnpackList<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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.