Skip to main content

BroadcastClone

Trait BroadcastClone 

Source
pub(crate) trait BroadcastClone
where Self: Sized,
{ type Id: Eq + Hash + Copy; // Required methods fn clone_for_broadcast(&self) -> Option<Self>; fn source( data: &StructuredSerializedData, ) -> &Option<FxHashMap<Self::Id, Self>>; fn destination( data: &mut StructuredSerializedData, ) -> &mut Option<FxHashMap<Self::Id, Self>>; }

Required Associated Types§

Source

type Id: Eq + Hash + Copy

The ID type that uniquely identify each value.

Required Methods§

Source

fn clone_for_broadcast(&self) -> Option<Self>

Clone this value so that it can be reused with a broadcast channel. Only return None if cloning is impossible.

Source

fn source(data: &StructuredSerializedData) -> &Option<FxHashMap<Self::Id, Self>>

The field from which to clone values.

Source

fn destination( data: &mut StructuredSerializedData, ) -> &mut Option<FxHashMap<Self::Id, Self>>

The field into which to place cloned values.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§