So i have a trait, Attributed, which is used to indicate something has attributes associated with it within my programming language: ```rs
pub trait Attributed {
fn get_unbound_attr_checked<A>(
&self,
attr: A,
checked: &mut Vec<Value>,
) -> Result<Option<Value>>;
fn get_unbound_attr<A: Attribute>(&self, attr: A) -> Result<Option<Value>> { ... }
fn get_attr<A: Attribute>(&self, attr: A) -> Result<Option<Value>> { ... }
fn has_attr<A: Attribute>(&self, attr: A) -> Result<bool> { ... }
fn try_get_attr<A: Attribute>(&self, attr: A) -> Result<Value>
where
Self: Clone + ToValue,
{ ... }
}
pub trait AttributedMut: Attributed {
fn get_unbound_attr_mut<A: Attribute>(&mut self, attr: A) -> Result<&mut Value>;
fn set_attr<A: Attribute>(&mut self, attr: A, value: Value) -> Result<()>;
fn del_attr<A: Attribute>(&mut self, attr: A) -> Result<Option<Value>>;
}
This trait's implemented by a few things, but the one i'm concerned about is `Value` itself, which is a 64-bit `Copy` type. Since these functions are called in a hot loop, having them take a reference for `Value`'s not ideal, as it's extra indirection. But I can't make the interface just by-value, because then nothing else could impelemnt it.
is there a good solution to this?