Explorar el Código

Add comment about using static lifetime for SocketSets with owned storage

Paul Menage hace 1 año
padre
commit
6e47c7ba7d
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/iface/socket_set.rs

+ 3 - 1
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>>,