pub struct Map(/* private fields */);Expand description
An ordered msgpack map: a list of key/value pairs in wire order.
Implementations§
Source§impl Map
impl Map
pub const fn new() -> Self
pub fn put( self, key: impl Into<Cow<'static, str>>, value: impl Into<Value>, ) -> Self
pub fn put_some( self, key: impl Into<Cow<'static, str>>, value: Option<impl Into<Value>>, ) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn into_pairs(self) -> impl Iterator<Item = (Cow<'static, str>, Value)>
pub fn into_pairs(self) -> impl Iterator<Item = (Cow<'static, str>, Value)>
The pairs themselves, in wire order, for splicing one map into another.
pub fn keys(&self) -> impl Iterator<Item = &str>
pub fn get(&self, key: &str) -> Option<&Value>
pub fn to_msgpack(&self) -> Vec<u8> ⓘ
pub fn to_json(&self) -> Json
Trait Implementations§
impl Eq for Map
Source§impl L1Action for Map
A map is an action already.
impl L1Action for Map
A map is an action already.
Source§fn action(&self) -> Map
fn action(&self) -> Map
The action’s keys and values in wire order, which is the hashed order.
fn msgpack(&self) -> Vec<u8> ⓘ
fn connection_id(&self, nonce: u64, vault: Option<Address>) -> [u8; 32]
fn typed( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> TypedStruct<'static>
fn digest( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> [u8; 32]
Source§fn wallet_json(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> String
fn wallet_json( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> String
For a master wallet signing in the browser. It needs chain 1337.
fn body( &self, nonce: u64, signature: &Signature, vault: Option<Address>, ) -> String
impl StructuralPartialEq for Map
Auto Trait Implementations§
impl Freeze for Map
impl RefUnwindSafe for Map
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl UnsafeUnpin for Map
impl UnwindSafe for Map
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.