multiversx_sc_snippets::imports

Trait Mergeable

Source
pub trait Mergeable<M>
where M: ManagedTypeApi,
{ // Required methods fn can_merge_with(&self, other: &Self) -> bool; fn merge_with(&mut self, other: Self); // Provided methods fn error_if_not_mergeable(&self, other: &Self) { ... } fn merge_with_multiple(&mut self, others: ManagedVec<M, Self>) where Self: Sized + ManagedVecItem { ... } }
Expand description

Used for types that can be merged locally.

Required Methods§

Source

fn can_merge_with(&self, other: &Self) -> bool

Source

fn merge_with(&mut self, other: Self)

Provided Methods§

Source

fn error_if_not_mergeable(&self, other: &Self)

Source

fn merge_with_multiple(&mut self, others: ManagedVec<M, Self>)
where Self: Sized + ManagedVecItem,

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§