[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72=JdNo7VON=PBM9iFWnXF-rWh_WTmDyqWb7uqh6q_JfMw@mail.gmail.com>
Date: Fri, 27 Jun 2025 21:53:31 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Danilo Krummrich <dakr@...nel.org>
Cc: gregkh@...uxfoundation.org, rafael@...nel.org, ojeda@...nel.org,
alex.gaynor@...il.com, boqun.feng@...il.com, gary@...yguo.net,
bjorn3_gh@...tonmail.com, lossin@...nel.org, a.hindborg@...nel.org,
aliceryhl@...gle.com, tmgross@...ch.edu, david.m.ertman@...el.com,
ira.weiny@...el.com, leon@...nel.org, kwilczynski@...nel.org,
bhelgaas@...gle.com, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH v4 4/5] rust: types: ForeignOwnable: Add type Target
On Thu, Jun 26, 2025 at 10:01 PM Danilo Krummrich <dakr@...nel.org> wrote:
>
> ForeignOwnable::Target defines the payload data of a ForeignOwnable. For
> Arc<T> for instance, ForeignOwnable::Target would just be T.
>
> This is useful for cases where a trait bound is required on the target
> type of the ForeignOwnable. For instance:
>
> fn example<P>(data: P)
> where
> P: ForeignOwnable,
> P::Target: MyTrait,
> {}
>
> Suggested-by: Benno Lossin <lossin@...nel.org>
> Signed-off-by: Danilo Krummrich <dakr@...nel.org>
Acked-by: Miguel Ojeda <ojeda@...nel.org>
Cheers,
Miguel
Powered by blists - more mailing lists