pub trait InnerRef {
type Value: ReprValue;
// Required method
fn get_inner_ref_with<'a>(&'a self, ruby: &Ruby) -> &'a Self::Value;
}
Expand description
Helper trait for Ruby::get_inner_ref
.
This trait allows for Ruby::get_inner_ref
to get a reference to the
inner value of both Opaque
and Lazy
.
Required Associated Types§
Required Methods§
sourcefn get_inner_ref_with<'a>(&'a self, ruby: &Ruby) -> &'a Self::Value
fn get_inner_ref_with<'a>(&'a self, ruby: &Ruby) -> &'a Self::Value
Get a reference to the inner value from self
.
ruby
acts as a token proving this is called from a Ruby thread and
thus it is safe to access the inner value.