[][src]Struct solana_sdk::syscall::slot_hashes::SlotHashes

pub struct SlotHashes { /* fields omitted */ }

Methods

impl SlotHashes[src]

pub fn from(account: &Account) -> Option<Self>[src]

pub fn to(&self, account: &mut Account) -> Option<()>[src]

pub fn size_of() -> usize[src]

pub fn add(&mut self, slot: u64, hash: Hash)[src]

Methods from Deref<Target = Vec<(u64, Hash)>>

pub fn capacity(&self) -> usize1.0.0[src]

Returns the number of elements the vector can hold without reallocating.

Examples

let vec: Vec<i32> = Vec::with_capacity(10);
assert_eq!(vec.capacity(), 10);

pub fn as_slice(&self) -> &[T]1.7.0[src]

Extracts a slice containing the entire vector.

Equivalent to &s[..].

Examples

use std::io::{self, Write};
let buffer = vec![1, 2, 3, 5, 8];
io::sink().write(buffer.as_slice()).unwrap();

pub fn len(&self) -> usize1.0.0[src]

Returns the number of elements in the vector, also referred to as its 'length'.

Examples

let a = vec![1, 2, 3];
assert_eq!(a.len(), 3);

pub fn is_empty(&self) -> bool1.0.0[src]

Returns true if the vector contains no elements.

Examples

let mut v = Vec::new();
assert!(v.is_empty());

v.push(1);
assert!(!v.is_empty());

Trait Implementations

impl PartialEq<SlotHashes> for SlotHashes[src]

impl Debug for SlotHashes[src]

impl Deref for SlotHashes[src]

type Target = Vec<(u64, Hash)>

The resulting type after dereferencing.

impl Serialize for SlotHashes[src]

impl<'de> Deserialize<'de> for SlotHashes[src]

Auto Trait Implementations

impl Send for SlotHashes

impl Sync for SlotHashes

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self