public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Max Carrara <m.carrara@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] applied: [PATCH pxar] decoder: aio: Make `TokioReader` public
Date: Fri, 4 Aug 2023 13:11:42 +0200	[thread overview]
Message-ID: <zqy7xndpsdalbzfrmzkac63s4ybl7f7k3wkx7grtupnfkvztbc@4ocfjifxkssm> (raw)
In-Reply-To: <20230721155819.1096415-1-m.carrara@proxmox.com>

applied, thanks

On Fri, Jul 21, 2023 at 05:58:19PM +0200, Max Carrara wrote:
> This exposes `decoder::aio::TokioReader<T>` in a similar manner to
> `decoder::sync::StandardReader<T>`, which is necessary if one wants
> to remain generic over `T: tokio::io::AsyncRead`, e.g.:
> 
> > struct FooDecoder<T: tokio::io::AsyncRead> {
> >    decoder: aio::Decoder<aio::TokioReader<T>>,
> > }
> 
> Signed-off-by: Max Carrara <m.carrara@proxmox.com>
> ---
>  src/decoder/aio.rs | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/decoder/aio.rs b/src/decoder/aio.rs
> index 200dd3d..e2166fe 100644
> --- a/src/decoder/aio.rs
> +++ b/src/decoder/aio.rs
> @@ -85,6 +85,7 @@ mod tok {
>      }
> 
>      impl<T: tokio::io::AsyncRead> TokioReader<T> {
> +        /// Create a new [TokioReader] from a type that implements [AsyncRead](tokio::io::AsyncRead).
>          pub fn new(inner: T) -> Self {
>              Self { inner }
>          }
> @@ -130,4 +131,4 @@ mod tok {
>  }
> 
>  #[cfg(feature = "tokio-io")]
> -use tok::TokioReader;
> +pub use tok::TokioReader;
> --
> 2.39.2




      reply	other threads:[~2023-08-04 11:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 15:58 [pbs-devel] " Max Carrara
2023-08-04 11:11 ` Wolfgang Bumiller [this message]

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=zqy7xndpsdalbzfrmzkac63s4ybl7f7k3wkx7grtupnfkvztbc@4ocfjifxkssm \
    --to=w.bumiller@proxmox.com \
    --cc=m.carrara@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal