#[repr(transparent)]pub struct NixList(Rc<Vector<Value>>);
Tuple Fields§
§0: Rc<Vector<Value>>
Implementations§
source§impl NixList
impl NixList
pub fn len(&self) -> usize
pub fn get(&self, i: usize) -> Option<&Value>
pub fn is_empty(&self) -> bool
pub fn construct(count: usize, stack_slice: Vec<Value>) -> Self
pub fn iter(&self) -> Iter<'_, Value>
pub fn ptr_eq(&self, other: &Self) -> bool
pub fn into_inner(self) -> Vector<Value>
pub fn from_vec(vs: Vec<Value>) -> Self
👎Deprecated: callers should avoid constructing from Vec
sourcepub async fn sort_by(self, co: &GenCo, cmp: Value) -> Result<Self, ErrorKind>
pub async fn sort_by(self, co: &GenCo, cmp: Value) -> Result<Self, ErrorKind>
Asynchronous sorting algorithm in which the comparator can make use of
VM requests (required as builtins.sort
uses comparators written in
Nix).
This is a simple, optimised bubble sort implementation. The choice of algorithm is constrained by the comparator in Nix not being able to yield equality, and us being unable to use the standard library implementation of sorting (which is a lot longer, but a lot more efficient) here.
Trait Implementations§
source§impl Arbitrary for NixList
impl Arbitrary for NixList
§type Parameters = <Value as Arbitrary>::Parameters
type Parameters = <Value as Arbitrary>::Parameters
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = BoxedStrategy<NixList>
type Strategy = BoxedStrategy<NixList>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(args: Self::Parameters) -> Self::Strategy
fn arbitrary_with(args: Self::Parameters) -> Self::Strategy
source§impl<'de> Deserialize<'de> for NixList
impl<'de> Deserialize<'de> for NixList
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> IntoIterator for &'a NixList
impl<'a> IntoIterator for &'a NixList
source§impl IntoIterator for NixList
impl IntoIterator for NixList
Auto Trait Implementations§
impl !RefUnwindSafe for NixList
impl !Send for NixList
impl !Sync for NixList
impl Unpin for NixList
impl !UnwindSafe for NixList
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