From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7BA4D366; Sun, 19 Oct 2025 12:01:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760875269; cv=none; b=eix0MTV8GnCJZ01pjpL3UoNoB83Fd4Nskndqv274FIOwQJtwASDugWlZJsrT+Zn3ksp6bv7m4bnb1wloX+0Xlxy3b2fYfwrhWrqlFGzhzSeEYArimB666FBNndFSphPxVu4jyJtgZZs7gLhEtTi9SG+MqyDEsc6WWf5vr6f1A3c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760875269; c=relaxed/simple; bh=wLrFfQpwX5AUQ4Kj9Hwv9ZUGP6NnwzbpnRrBBpfemSg=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:To:From:Subject: References:In-Reply-To; b=oX2/yHb57hnbw/7LS/QNQrhDh2D99fL1F+Nwh8YfvcvaVXLUXdeLr3OjvLYjTRQMoy71V4Ueu+ZDIXD2XsWXVzjNlu8UflzHjLVTjVNgjzCqOGbX23t6TlaUgOdQN5E/fBzjdbbsZ5Pi1eX4p3WtyqqT8pk/K9k+XoT23/bp4GM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZawG/+Ue; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZawG/+Ue" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5288FC4CEE7; Sun, 19 Oct 2025 12:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760875268; bh=wLrFfQpwX5AUQ4Kj9Hwv9ZUGP6NnwzbpnRrBBpfemSg=; h=Date:Cc:To:From:Subject:References:In-Reply-To:From; b=ZawG/+UeDCjvxPz3IEiLT2VWNi/cjkgmnXahV+otzDknn6x9tOZLVvidi9fOq2gmz fEPLc6j5nVSYJF8W0FIKM2NnwSc8V+O80LChD5RbOpfF8slDA5t1et3G553I3RSqes 93/xNBk1/i4VhCzLAwmV6QjsPzW3gpAyVYRFchq62kEcnZvD4cAgPlKbDYaHEpXQ38 ZqRuD1UfpolvZ+vXbTcm0Ab/GGuZZK/2juma2tSNxPyRwkZ0J5hgFe+S8EzyDfwsuR QovunS3QcRU9vMrz4BuS8Dw6B6zC6TwCLPB+lAqo5Zmdur2Jvw/sViqGG7rlcUHyq9 LVNdyBefpdX9Q== Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sun, 19 Oct 2025 14:01:03 +0200 Message-Id: Cc: , , , , , , , , , , , , To: "Alice Ryhl" From: "Danilo Krummrich" Subject: Re: [PATCH 3/7] rust: debugfs: support for binary large objects References: <20251003222729.322059-1-dakr@kernel.org> <20251003222729.322059-4-dakr@kernel.org> In-Reply-To: On Sun Oct 19, 2025 at 11:44 AM CEST, Alice Ryhl wrote: > On Fri, Oct 17, 2025 at 04:53:09PM +0200, Danilo Krummrich wrote: >> On Fri Oct 17, 2025 at 4:37 PM CEST, Danilo Krummrich wrote: >> > The reason I went with a trait is because that's consistent within the= file. >> > >> > Otherwise, I don't mind one or the other. If we always want to use a s= truct, I'm >> > fine with that. :) >>=20 >> Actually, there's another reason I forgot about since I sent the series.= :) >>=20 >> We need it because we derive it from blanket implementations: >>=20 >> impl BinaryReadFile for T >> impl BinaryWriteFile for T >> impl BinaryReadWriteFile for = T > > You can still use a struct: > > struct BinaryWriterVtable; > > impl BinaryWriterVtable { > const VTABLE: bindings::foo =3D ...; > } Yeah, but do we get something for adding yet another type in this case? Another point to consider is if we want a more generic fops abstraction typ= e. In any case, I'd like to add this as good first issue for the whole file to= be changed accordingly.