pub trait HasArray<'a>: Machine<'a> {
// Required method
fn new_empty_array<'b>(
&'b self
) -> Result<Self::Datum<'b, 'static>, MachineError>;
// Provided method
fn new_array<'b, 'c, I>(
&'b self,
elements: I
) -> Result<Self::Datum<'b, 'static>, MachineError>
where I: IntoIterator<Item = Self::Datum<'b, 'c>>,
for<'d> <Self as Machine<'a>>::Datum<'b, 'static>: MaybeArray<Element<'d> = <Self as Machine<'a>>::Datum<'b, 'd>> { ... }
}
Expand description
Machine
s, which have array-like types
Required Methods§
sourcefn new_empty_array<'b>(
&'b self
) -> Result<Self::Datum<'b, 'static>, MachineError>
fn new_empty_array<'b>( &'b self ) -> Result<Self::Datum<'b, 'static>, MachineError>
Create datum that is an empty array
Provided Methods§
sourcefn new_array<'b, 'c, I>(
&'b self,
elements: I
) -> Result<Self::Datum<'b, 'static>, MachineError>where
I: IntoIterator<Item = Self::Datum<'b, 'c>>,
for<'d> <Self as Machine<'a>>::Datum<'b, 'static>: MaybeArray<Element<'d> = <Self as Machine<'a>>::Datum<'b, 'd>>,
fn new_array<'b, 'c, I>( &'b self, elements: I ) -> Result<Self::Datum<'b, 'static>, MachineError>where I: IntoIterator<Item = Self::Datum<'b, 'c>>, for<'d> <Self as Machine<'a>>::Datum<'b, 'static>: MaybeArray<Element<'d> = <Self as Machine<'a>>::Datum<'b, 'd>>,
Create datum that is an array