From 6e47c7ba7d49e29d22014a188aa486386f4abada Mon Sep 17 00:00:00 2001 From: Paul Menage Date: Sat, 8 Jul 2023 08:50:04 -0700 Subject: [PATCH] Add comment about using static lifetime for SocketSets with owned storage --- src/iface/socket_set.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/iface/socket_set.rs b/src/iface/socket_set.rs index fe9bef755..be55fef5d 100644 --- a/src/iface/socket_set.rs +++ b/src/iface/socket_set.rs @@ -37,7 +37,9 @@ impl fmt::Display for SocketHandle { /// An extensible set of sockets. /// -/// The lifetime `'a` is used when storing a `Socket<'a>`. +/// The lifetime `'a` is used when storing a `Socket<'a>`. If you're using +/// owned buffers for your sockets (passed in as `Vec`s) you can use +/// `SocketSet<'static>`. #[derive(Debug)] pub struct SocketSet<'a> { sockets: ManagedSlice<'a, SocketStorage<'a>>,