Type Alias solana_runtime::accounts_index::SlotSlice
source · pub type SlotSlice<'s, T> = &'s [(Slot, T)];
Trait Implementations§
source§impl<'a, Block, R> BitSliceable<R> for &'a [Block]where
Block: BlockType,
BitSlice<'a, Block>: BitSliceable<R, Block = Block, Slice = BitSlice<'a, Block>>,
impl<'a, Block, R> BitSliceable<R> for &'a [Block]where Block: BlockType, BitSlice<'a, Block>: BitSliceable<R, Block = Block, Slice = BitSlice<'a, Block>>,
§impl<'a, T> CanonicalSerialize for &'a [T]where
T: CanonicalSerialize,
impl<'a, T> CanonicalSerialize for &'a [T]where T: CanonicalSerialize,
§fn serialize_with_mode<W>(
&self,
writer: W,
compress: Compress
) -> Result<(), SerializationError>where
W: Write,
fn serialize_with_mode<W>( &self, writer: W, compress: Compress ) -> Result<(), SerializationError>where W: Write,
The general serialize method that takes in customization flags.
fn serialized_size(&self, compress: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where W: Write,
fn uncompressed_size(&self) -> usize
§impl<'a, T> DefaultPositioned for &'a [T]
impl<'a, T> DefaultPositioned for &'a [T]
type Positioner = IndexPositioner
1.0.0 · source§impl<'a, T> IntoIterator for &'a [T]
impl<'a, T> IntoIterator for &'a [T]
source§impl<'data, T> IntoParallelIterator for &'data [T]where
T: Sync + 'data,
impl<'data, T> IntoParallelIterator for &'data [T]where T: Sync + 'data,
§impl<T, U> PartialEq<StableVec<U>> for &[T]where
T: PartialEq<U>,
impl<T, U> PartialEq<StableVec<U>> for &[T]where T: PartialEq<U>,
1.46.0 · source§impl<T, U, A> PartialEq<Vec<U, A>> for &[T]where
A: Allocator,
T: PartialEq<U>,
impl<T, U, A> PartialEq<Vec<U, A>> for &[T]where A: Allocator, T: PartialEq<U>,
§impl<'a, T> RangeStreamOnce for &'a [T]where
T: Clone + PartialEq<T>,
impl<'a, T> RangeStreamOnce for &'a [T]where T: Clone + PartialEq<T>,
§fn uncons_range(
&mut self,
size: usize
) -> Result<&'a [T], <<&'a [T] as StreamOnce>::Error as ParseError<<&'a [T] as StreamOnce>::Item, <&'a [T] as StreamOnce>::Range, <&'a [T] as StreamOnce>::Position>>::StreamError>
fn uncons_range( &mut self, size: usize ) -> Result<&'a [T], <<&'a [T] as StreamOnce>::Error as ParseError<<&'a [T] as StreamOnce>::Item, <&'a [T] as StreamOnce>::Range, <&'a [T] as StreamOnce>::Position>>::StreamError>
Takes
size
elements from the stream.
Fails if the length of the stream is less than size
.§fn uncons_while<F>(
&mut self,
f: F
) -> Result<&'a [T], <<&'a [T] as StreamOnce>::Error as ParseError<<&'a [T] as StreamOnce>::Item, <&'a [T] as StreamOnce>::Range, <&'a [T] as StreamOnce>::Position>>::StreamError>where
F: FnMut(<&'a [T] as StreamOnce>::Item) -> bool,
fn uncons_while<F>( &mut self, f: F ) -> Result<&'a [T], <<&'a [T] as StreamOnce>::Error as ParseError<<&'a [T] as StreamOnce>::Item, <&'a [T] as StreamOnce>::Range, <&'a [T] as StreamOnce>::Position>>::StreamError>where F: FnMut(<&'a [T] as StreamOnce>::Item) -> bool,
Takes items from stream, testing each one with
predicate
.
returns the range of items which passed predicate
.§fn uncons_while1<F>(
&mut self,
f: F
) -> FastResult<<&'a [T] as StreamOnce>::Range, <<&'a [T] as StreamOnce>::Error as ParseError<<&'a [T] as StreamOnce>::Item, <&'a [T] as StreamOnce>::Range, <&'a [T] as StreamOnce>::Position>>::StreamError>where
F: FnMut(<&'a [T] as StreamOnce>::Item) -> bool,
fn uncons_while1<F>( &mut self, f: F ) -> FastResult<<&'a [T] as StreamOnce>::Range, <<&'a [T] as StreamOnce>::Error as ParseError<<&'a [T] as StreamOnce>::Item, <&'a [T] as StreamOnce>::Range, <&'a [T] as StreamOnce>::Position>>::StreamError>where F: FnMut(<&'a [T] as StreamOnce>::Item) -> bool,
Takes items from stream, testing each one with
predicate
returns a range of at least one items which passed predicate
. Read more§impl<'a, T> StreamOnce for &'a [T]where
T: Clone + PartialEq<T>,
impl<'a, T> StreamOnce for &'a [T]where T: Clone + PartialEq<T>,
§type Range = &'a [T]
type Range = &'a [T]
The type of a range of items yielded from this stream.
Types which do not a have a way of yielding ranges of items should just use the
Self::Item
for this type.§type Position = PointerOffset
type Position = PointerOffset
Type which represents the position in a stream.
Ord
is required to allow parsers to determine which of two positions are further ahead.type Error = UnexpectedParse
§fn uncons(
&mut self
) -> Result<T, <<&'a [T] as StreamOnce>::Error as ParseError<<&'a [T] as StreamOnce>::Item, <&'a [T] as StreamOnce>::Range, <&'a [T] as StreamOnce>::Position>>::StreamError>
fn uncons( &mut self ) -> Result<T, <<&'a [T] as StreamOnce>::Error as ParseError<<&'a [T] as StreamOnce>::Item, <&'a [T] as StreamOnce>::Range, <&'a [T] as StreamOnce>::Position>>::StreamError>
Takes a stream and removes its first item, yielding the item and the rest of the elements.
Returns
Err
if no element could be retrieved.§fn is_partial(&self) -> bool
fn is_partial(&self) -> bool
Returns
true
if this stream only contains partial input. Read more