DataProvider

Struct DataProvider 

Source
pub struct DataProvider {
    data_source: MockData,
    next_slot: usize,
    slots: [Vec<u8>; 256],
    pub _rounding_mode: RippledRoundingMode,
}

Fields§

§data_source: MockData§next_slot: usize§slots: [Vec<u8>; 256]§_rounding_mode: RippledRoundingMode

Implementations§

Source§

impl DataProvider

Source

pub fn new(data_source: MockData) -> Self

Source

pub fn slot_set(&mut self, keylet: Vec<u8>, slot: usize) -> i32

Source

pub fn slot_get(&self, slot: usize) -> Option<&Vec<u8>>

Source

pub fn get_field_value( &self, source: DataSource, idx_fields: Vec<i32>, buf_cap: usize, ) -> (i32, Vec<u8>)

Source

pub fn get_array_len(&self, source: DataSource, idx_fields: Vec<i32>) -> i32

Source

pub fn get_ledger_sqn(&self) -> i32

Source

pub fn get_parent_ledger_time(&self) -> i32

Source

pub fn get_parent_ledger_hash(&self, buf_cap: usize) -> (i32, Vec<u8>)

Source

pub fn get_nft_uri( &self, nft_id: &Vec<u8>, account_id: &Vec<u8>, buf_cap: usize, ) -> (i32, Vec<u8>)

Source

pub fn set_current_ledger_obj_data(&mut self, data: Vec<u8>)

Source

fn fill_buf( field_result: Option<&Value>, buf_cap: usize, decodable: Decodable, ) -> (i32, Vec<u8>)

Source

pub fn as_ptr(&mut self) -> *mut c_void

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.