Trait TokenMapAccessMut

Source
pub trait TokenMapAccessMut {
    // Required methods
    fn get_mut(&mut self, token: &Pubkey) -> Option<&mut TokenConfig>;
    fn push_with(
        &mut self,
        token: &Pubkey,
        f: impl FnOnce(&mut TokenConfig) -> Result<()>,
        new: bool,
    ) -> Result<()>;
}
Expand description

Token Map Operations.

The token map is append-only.

Required Methods§

Source

fn get_mut(&mut self, token: &Pubkey) -> Option<&mut TokenConfig>

Get mutably the config of the given token.

Source

fn push_with( &mut self, token: &Pubkey, f: impl FnOnce(&mut TokenConfig) -> Result<()>, new: bool, ) -> Result<()>

Push a new token config.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§