pub struct MockData {
tx: Value,
hosting_ledger_obj: Value,
header: Value,
ledger: HashMap<Vec<u8>, Value>,
nfts: HashMap<Vec<u8>, (Vec<u8>, Value)>,
}Fields§
§tx: Value§hosting_ledger_obj: Value§header: Value§ledger: HashMap<Vec<u8>, Value>§nfts: HashMap<Vec<u8>, (Vec<u8>, Value)>Implementations§
Source§impl MockData
impl MockData
pub fn new( tx_str: &str, hosting_ledger_obj_str: &str, header_str: &str, ledger_str: &str, nfts_str: &str, ) -> Self
pub fn obj_exist(&self, keylet: &Vec<u8>) -> bool
fn get_field_name(&self, field_id: i32) -> Option<String>
pub fn get_field_value( &self, source: DataSource, idx_fields: Vec<i32>, ) -> Result<(i32, &Value), HostError>
pub fn get_ledger_sqn(&self) -> Option<&Value>
pub fn get_parent_ledger_time(&self) -> Option<&Value>
pub fn get_parent_ledger_hash(&self) -> Option<&Value>
pub fn set_current_ledger_obj_data(&mut self, data: Vec<u8>)
pub fn get_nft_uri( &self, nft_id: &Vec<u8>, account_id: &Vec<u8>, ) -> Option<&Value>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MockData
impl RefUnwindSafe for MockData
impl Send for MockData
impl Sync for MockData
impl Unpin for MockData
impl UnwindSafe for MockData
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