Re: [PATCH V6 3/8] libgpiod: Add rust wrapper crate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 11, 2022 at 09:46:51AM +0530, Viresh Kumar wrote:
> On 29-09-22, 15:55, Miguel Ojeda wrote:
> > It looks like a container whose elements get invalidated, so
> > `read_edge_event` could require an exclusive reference to `buffer` in
> > Rust, that way you cannot keep borrows to its elements like `ev` if
> > you want to call it. But of course this requires tying the lifetime of
> > the events to that of the buffer.
> 
> What about the below code changes on top of V6 ?
> 

Can you clone the event to detach it from the buffer?
Or are you now forced to drop the event before reading more?

Cheers,
Kent.



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux