Support transmuting Ref<B, T>
into Ref<B, U>
#2133
Labels
customer-request
Documents customer requests.
Ref<B, T>
into Ref<B, U>
#2133
Given
T: IntoBytes
andU: FromBytes
, we use the same logic astransmute_ref!
, only withRef
instead of references. This will need to be fallible for size and alignment reasons.This would permit Fuchsia's Netstack3 to implement this code generically, e.g. replacing
pub fn as_v1_query(&self) -> Mldv1Body<&[u8]>
withpub fn into_v1_query(self) -> Mldv1Body<B>
.The text was updated successfully, but these errors were encountered: