Re: [RFC PATCH 1/3] rust: implement wrapper for acpi_object

From: Danilo Krummrich

Date: Mon Dec 22 2025 - 17:44:50 EST


On Mon Dec 22, 2025 at 10:47 PM CET, Gladyshev Ilya wrote:
> I couldn't really decide between implementing all types or only the one
> needed... Probably, I should provide simple implementations for all the
> others, I will fix that.

If they are not needed by any of the drivers you're aiming at, you should
probably just drop them.

> Wouldn't it be confusing to overload Deref on a non "pointer-like" type
> just for an implicit cast?

What do you mean with overload Deref? What I mean is

impl Deref for AcpiBuffer {
type Target = [u8];

[...]
}

impl Deref for AcpiInteger {
type Target = u64;

[...]
}

impl Deref for AcpiString {
type Target = CStr;

[...]
}

etc.