Skip to main content

__impl_altvec_dataptr

Macro __impl_altvec_dataptr 

Source
#[doc(hidden)]
macro_rules! __impl_altvec_dataptr { ($ty:ty, $elem:ty) => { ... }; }
Expand description

Internal macro: impl AltVec with dataptr support

When writable = true, obtains a mutable reference to the data via altrep_data1_mut so that writes through the returned pointer modify the Rust-owned data directly. When writable = false, uses the immutable altrep_data1_as + dataptr_or_null path, avoiding unnecessary mutable borrows (and, for Cow, avoiding a copy-on-write).