#[doc(hidden)]pub fn sidecar_set<O, T>(
ptr: &mut impl SidecarOwnerMut<O>,
index: usize,
name: &'static str,
field: fn(&O) -> &Sidecar<T>,
value: T,
)where
O: TypedExternal,
T: IntoR,Expand description
Stores value in T’s Sidecar field index of the object ptr holds,
dropping the field’s pending value, which this write supersedes.
Called by the setters #[derive(ExternalPtr)] generates
(T::set_field(&mut ptr, value)); field selects the struct’s Sidecar
field.
§Panics
Off R’s main thread, naming the field, before touching R.