pub struct MoveTypeMapper { /* private fields */ }Expand description
Maps Move types to Rust types.
Implementations§
Source§impl MoveTypeMapper
impl MoveTypeMapper
Sourcepub fn add_mapping(&mut self, move_type: impl Into<String>, rust_type: RustType)
pub fn add_mapping(&mut self, move_type: impl Into<String>, rust_type: RustType)
Adds a custom type mapping.
Sourcepub fn to_bcs_arg(&self, move_type: &str, var_name: &str) -> String
pub fn to_bcs_arg(&self, move_type: &str, var_name: &str) -> String
Maps a Move type to a BCS argument encoding expression.
Sourcepub fn is_signer_param(&self, move_type: &str) -> bool
pub fn is_signer_param(&self, move_type: &str) -> bool
Determines if a parameter should be excluded from the function signature. (e.g., &signer is always the sender)
Trait Implementations§
Source§impl Clone for MoveTypeMapper
impl Clone for MoveTypeMapper
Source§fn clone(&self) -> MoveTypeMapper
fn clone(&self) -> MoveTypeMapper
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MoveTypeMapper
impl Debug for MoveTypeMapper
Auto Trait Implementations§
impl Freeze for MoveTypeMapper
impl RefUnwindSafe for MoveTypeMapper
impl Send for MoveTypeMapper
impl Sync for MoveTypeMapper
impl Unpin for MoveTypeMapper
impl UnwindSafe for MoveTypeMapper
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