pub trait Carry:
Any
+ Send
+ Sync {
// Required methods
fn held(&self) -> &[Value];
fn held_mut(&mut self) -> &mut [Value];
// Provided method
fn same(&self, _other: &dyn Carry) -> bool { ... }
}Expand description
What a Native value carries, and what it can say of itself.
Required Methods§
Sourcefn held_mut(&mut self) -> &mut [Value]
fn held_mut(&mut self) -> &mut [Value]
The values Carry::held returns, to be moved out as it drops, or
none when another carrier shares them and drops them in its turn.
Neither has a default, so a carrier that holds values says how to
move them out and its drop stays shallow.
Provided Methods§
Sourcefn same(&self, _other: &dyn Carry) -> bool
fn same(&self, _other: &dyn Carry) -> bool
Whether other is the same as this one, as Value::same asks.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".