From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B208FC4332F for ; Fri, 14 Oct 2022 09:45:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229498AbiJNJpd (ORCPT ); Fri, 14 Oct 2022 05:45:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbiJNJpb (ORCPT ); Fri, 14 Oct 2022 05:45:31 -0400 Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE732AA345 for ; Fri, 14 Oct 2022 02:45:30 -0700 (PDT) Received: by mail-vk1-xa2a.google.com with SMTP id a66so2004318vkc.3 for ; Fri, 14 Oct 2022 02:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VdrO7mtmH1DUJFW63UXShj5ag8RgWaG1H1XRoRcxtTs=; b=sMxDTqBcwK2dgKQ5w/9inhL7fMhTlzLHS90sVSa7GMjeOyg+mgQHfqNgVCerfFR1gw 3CYGW2raBpTbXs47jCdM0JfcNJqZ8HlfISkErR0on4C53FTbPojNevUGECTtIymIVaYa LRoeWfi2sWVzV5yTpQkilg34qS1tAZb8f9uuSa54IEjQRS5A+b6vEs/s85peI5aCZZlj PvTXrSB/tmvKxRa1tyZ5Xv74liLMV23Ubk9xWgJG1hYJA2PQrXiysYNYU5BUQeWlmY36 habGYudhQ0UqL4Ra5G8+u+u+Zc0y1aSFbA78+snZRtNjjfXzVPzxSjShQFxf08OkFlNY Jj2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VdrO7mtmH1DUJFW63UXShj5ag8RgWaG1H1XRoRcxtTs=; b=2VQrNl4TWwx0MCsKHruovRXaakS79skpFHH3MRzoMSlXNfhgBgsYrWuW5WXs9S5+YQ U79hKAPhFhhdOrAUVRAdfIBQOjMMo/qOevfZJME5jofnEMZUnBMJh4nLp0pAFrio5sWi L9oPngudZIyRWfn/7Iyaany5c6oywQciOzNgkKs74DDOliJfVmWxDqwpdmcJ2QkIkTHZ W6+lX0zY5brr+mX2uLO1KApF/PFWBba3o2R/JM6UkDd8e4ZA2RoGRsnX7Hn++LCuIDrs JO4svjKucdhsYLMGTWFwvYW78E17ZRr1K0hqXqG/daC8JuZN4g7cexd5GAcMy53RuVxH OZLA== X-Gm-Message-State: ACrzQf0SjTmgVr1SXv14i69MbslfX/Hjc0fLQ8KZjRxQbeJcTAtsNFYp CLBAkcdwB8axr7/g3PYKiC0cdYZMeuegJfHkHd7oOcRWpJA= X-Google-Smtp-Source: AMsMyM68twGM7x8UfT+97HqbkocKaOFaTG7GCm/lGpezFjTURb8VMAnqbIQlZJkICu7XoFk9ReaF1rrtzzmfeH/iDJ0= X-Received: by 2002:a1f:4843:0:b0:3ae:c4a3:d653 with SMTP id v64-20020a1f4843000000b003aec4a3d653mr1758316vka.1.1665740729534; Fri, 14 Oct 2022 02:45:29 -0700 (PDT) MIME-Version: 1.0 References: <20220928111043.bs2ihopdxduavcsq@vireshk-i7> <20220928151716.3hhbcrjwskvwvajh@vireshk-i7> <20221011041651.amibtu24kcgm67e7@vireshk-i7> <20221013061204.hu2vn24g42egybbl@vireshk-i7> In-Reply-To: <20221013061204.hu2vn24g42egybbl@vireshk-i7> From: Bartosz Golaszewski Date: Fri, 14 Oct 2022 11:45:18 +0200 Message-ID: Subject: Re: [PATCH V6 3/8] libgpiod: Add rust wrapper crate To: Viresh Kumar Cc: Miguel Ojeda , Linus Walleij , Vincent Guittot , linux-gpio@vger.kernel.org, Kent Gibson , =?UTF-8?B?QWxleCBCZW5uw6ll?= , stratos-dev@op-lists.linaro.org, Gerard Ryan Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Thu, Oct 13, 2022 at 8:12 AM Viresh Kumar wrote: > > On 11-10-22, 09:46, Viresh Kumar wrote: > > What about the below code changes on top of V6 ? > > > > Changes: > > - Removed BufferInternal. > > - Event contains a reference to the Buffer now, with lifetime. > > - read_edge_event() expects a mutable reference to buffer, to make it > > exclusive, i.e. disallow any previous Event references to exist at > > compilation itself. > > Bartosz, should I send a V7 now with these changes ? I hope everything > is settled ? > Maybe also add chained mutators everywhere? To be able to do settings.set_direction().set_edge() etc.? And I would still love a thorough API review from someone who actually knows rust too. :( But I will play some more with v7 so do send it. Bartosz