From: "impaqt" <impaqt@vendek.net>
To: "Alyssa Ross" <hi@alyssa.is>,
"Cole Helbling" <cole.e.helbling@outlook.com>
Cc: devel@spectrum-os.org
Subject: Re: [PATCH crosvm 1/2] msg_socket: introduce UnixSeqpacketExt
Date: Wed, 24 Jun 2020 18:54:36 -0700 [thread overview]
Message-ID: <C3PT4E84EP2V.2R7DFPMRN4B3R@jupiter> (raw)
In-Reply-To: <87a713qrto.fsf@alyssa.is>
> (3) Make each each VmRequest case a newtype, like so:
>
> #[derive(MsgOnSocket, Debug)]
> pub enum VmRequest {
> Exit(Exit),
> Suspend(Suspend),
> ...
> }
>
> 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
next prev parent reply other threads:[~2020-06-25 1:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-14 11:43 [PATCH crosvm 0/2] Fix deadlock on early VmRequest Alyssa Ross
2020-06-14 11:43 ` [PATCH crosvm 1/2] msg_socket: introduce UnixSeqpacketExt Alyssa Ross
2020-06-16 0:17 ` Cole Helbling
2020-06-16 9:32 ` Alyssa Ross
2020-06-22 22:06 ` Cole Helbling
2020-06-23 2:32 ` Alyssa Ross
2020-06-25 1:54 ` impaqt [this message]
2020-07-09 13:24 ` Alyssa Ross
2020-06-14 11:43 ` [PATCH crosvm 2/2] crosvm: fix deadlock on early VmRequest Alyssa Ross
2020-06-16 1:08 ` Cole Helbling
2020-06-16 9:39 ` Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C3PT4E84EP2V.2R7DFPMRN4B3R@jupiter \
--to=impaqt@vendek.net \
--cc=cole.e.helbling@outlook.com \
--cc=devel@spectrum-os.org \
--cc=hi@alyssa.is \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).