pub trait UZeroCopyTransportExt: UZeroCopyTransport {
// Provided methods
fn send_loaned_payload<'life0, 'async_trait, T>(
&'life0 self,
metadata: UFrameMetadata,
init: impl 'async_trait + for<'payload> FnOnce(&'payload mut T) + Send,
) -> Pin<Box<dyn Future<Output = Result<(), UStatus>> + Send + 'async_trait>>
where Self: UHasWire + Sync + 'async_trait,
Self::Wire: UWirePayload<T>,
<Self::Wire as UWirePayload<T>>::Codec: LoanPayload<T> + Send + Sync,
T: 'async_trait,
'life0: 'async_trait { ... }
fn send_loaned_payload_as<'life0, 'async_trait, C, T>(
&'life0 self,
metadata: UFrameMetadata,
init: impl 'async_trait + for<'payload> FnOnce(&'payload mut T) + Send,
) -> Pin<Box<dyn Future<Output = Result<(), UStatus>> + Send + 'async_trait>>
where C: PayloadCodec + LoanPayload<T> + Send + Sync + 'async_trait,
T: 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Role: free blanket methods on every zero-copy transport; never implemented by hand — see the trait map.
Convenience methods for zero-copy transports with initialized TX storage.
Provided Methods§
Sourcefn send_loaned_payload<'life0, 'async_trait, T>(
&'life0 self,
metadata: UFrameMetadata,
init: impl 'async_trait + for<'payload> FnOnce(&'payload mut T) + Send,
) -> Pin<Box<dyn Future<Output = Result<(), UStatus>> + Send + 'async_trait>>where
Self: UHasWire + Sync + 'async_trait,
Self::Wire: UWirePayload<T>,
<Self::Wire as UWirePayload<T>>::Codec: LoanPayload<T> + Send + Sync,
T: 'async_trait,
'life0: 'async_trait,
fn send_loaned_payload<'life0, 'async_trait, T>(
&'life0 self,
metadata: UFrameMetadata,
init: impl 'async_trait + for<'payload> FnOnce(&'payload mut T) + Send,
) -> Pin<Box<dyn Future<Output = Result<(), UStatus>> + Send + 'async_trait>>where
Self: UHasWire + Sync + 'async_trait,
Self::Wire: UWirePayload<T>,
<Self::Wire as UWirePayload<T>>::Codec: LoanPayload<T> + Send + Sync,
T: 'async_trait,
'life0: 'async_trait,
Initializes a typed payload using the adapter’s selected wire and sends it.
Prefer this selected-wire helper on values produced by explicit selected-wire adapter construction.
Use Self::send_loaned_payload_as only for low-level codec escape hatches.
§Errors
Returns an error if the selected wire does not successfully loan, encode, or send the payload through the underlying transport.
Sourcefn send_loaned_payload_as<'life0, 'async_trait, C, T>(
&'life0 self,
metadata: UFrameMetadata,
init: impl 'async_trait + for<'payload> FnOnce(&'payload mut T) + Send,
) -> Pin<Box<dyn Future<Output = Result<(), UStatus>> + Send + 'async_trait>>where
C: PayloadCodec + LoanPayload<T> + Send + Sync + 'async_trait,
T: 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn send_loaned_payload_as<'life0, 'async_trait, C, T>(
&'life0 self,
metadata: UFrameMetadata,
init: impl 'async_trait + for<'payload> FnOnce(&'payload mut T) + Send,
) -> Pin<Box<dyn Future<Output = Result<(), UStatus>> + Send + 'async_trait>>where
C: PayloadCodec + LoanPayload<T> + Send + Sync + 'async_trait,
T: 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Initializes a typed payload directly in a transmit loan and sends it.
This is the low-level codec-selected form. Product code that already uses
explicit selected-wire adapter construction should prefer
send_loaned_payload so the
selected wire supplies the payload codec.
§Errors
Returns an error if metadata validation fails, the transport cannot loan the requested initialized layout, the codec rejects the loaned storage, or sending the committed loan fails.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.