On Fri Jun 19, 2026 at 12:08 AM BST, Danilo Krummrich wrote:
> Extend the auxiliary driver sample to demonstrate both access patterns:
> 
>   - registration_data() with CovariantForLt!(Data<'_>) for the covariant
>     data type that holds a plain &'bound reference.
> 
>   - registration_data_with() with ForLt!(MutexData<'_>) for an invariant
>     data type that wraps a Mutex<&'bound Device>. Since Mutex<T> is
>     invariant over T, MutexData cannot implement CovariantForLt and must
>     use the closure-based accessor.
> 
> Signed-off-by: Danilo Krummrich <[email protected]>

Reviewed-by: Gary Guo <[email protected]>

> ---
>  samples/rust/rust_driver_auxiliary.rs | 94 +++++++++++++++++++--------
>  1 file changed, 68 insertions(+), 26 deletions(-)

Reply via email to