From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.3 (2019-12-06) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.3 Received: by atuin.qyliss.net (Postfix, from userid 496) id 487C1FCFB; Thu, 25 Jun 2020 01:57:07 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id BD29FFCEE; Thu, 25 Jun 2020 01:57:01 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id BB694FD7E; Thu, 25 Jun 2020 01:56:58 +0000 (UTC) Received: from sender4-of-o56.zoho.com (sender4-of-o56.zoho.com [136.143.188.56]) by atuin.qyliss.net (Postfix) with ESMTPS id B1EF1FD7C for ; Thu, 25 Jun 2020 01:56:54 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1593050209; cv=none; d=zohomail.com; s=zohoarc; b=mLqe+ADmv84NmDN3yQtccz/2Exbfkt2CukrClO4To24P4f+Olu16wti0efVwqcCEyR0Ia+i2vaeu8tKoRPsXaZ9OsbdhjEaKLL8QQDlAGbhz9tcGEJnHqAx3sUm3KvTSovpAsvVRn99DpVLvszek7XFLHIjiOa6zy0MFGmxjoMM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593050209; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:Message-ID:Subject:To; bh=elp38cOTUbDM9hIGYMiOriUtsMzvUsQ09Wzuoe1wL4A=; b=Yj2asSbZicLsKmN4BSmCSKAMhdxLLaXH7dOqW5duO+1EGPE+q0Pfeuzcp60/bvCIhNcbm3qVBpaxgooEWSveb9wdeU3UvzGbcP+UtaGNJvsmzylP7YgmiVmM5WVncIay/XQR7NAlrIHa/NDFeZMMi4qHq5s82JDGTI+VUZVl6JA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=vendek.net; spf=pass smtp.mailfrom=impaqt@vendek.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1593050209; s=zoho; d=vendek.net; i=impaqt@vendek.net; h=Content-Transfer-Encoding:Content-Type:Subject:From:To:Cc:Date:Message-Id:In-Reply-To; bh=elp38cOTUbDM9hIGYMiOriUtsMzvUsQ09Wzuoe1wL4A=; b=Mm+79roS5Tb2l5e4/pYSeHexuhIKsOBaiT/fsBgwYbOtAF4QIu+c9URNO+NDLBzF 2cQdzLDUXuM5e3o7ogGhDkcgPWcE+dwNXLb17CDaO+2ga39X0xtEBsKIEEQfIUTfcYy l0WGMzL/ZJO2iqnQK3zkqrVh7qpHlyL8NKQUwwrE= Received: from localhost (50.35.77.78 [50.35.77.78]) by mx.zohomail.com with SMTPS id 15930501969851015.7894644398227; Wed, 24 Jun 2020 18:56:36 -0700 (PDT) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH crosvm 1/2] msg_socket: introduce UnixSeqpacketExt From: "impaqt" To: "Alyssa Ross" , "Cole Helbling" Date: Wed, 24 Jun 2020 18:54:36 -0700 Message-Id: In-Reply-To: <87a713qrto.fsf@alyssa.is> X-ZohoMailClient: External Message-ID-Hash: ZBVSIQI6AULQSHW3EIQG6CRCPTECCINS X-Message-ID-Hash: ZBVSIQI6AULQSHW3EIQG6CRCPTECCINS X-MailFrom: impaqt@vendek.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: devel@spectrum-os.org X-Mailman-Version: 3.3.1 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: > (3) Make each each VmRequest case a newtype, like so: > > #[derive(MsgOnSocket, Debug)] > pub enum VmRequest { > Exit(Exit), > Suspend(Suspend), > ... > } > =20 > This would basically be a workaround for the fact that enum variants in > Rust aren't proper types. If they were, though (which we can emulate > through this approach), we could have some trait with an associated > socket type for executing each type of request. The machine crate might make this option a bit less annoying: https://github.com/rust-bakery/machine