Skip to content

Commit 6e47c7b

Browse files
committed
Add comment about using static lifetime for SocketSets with owned storage
1 parent 7ff1364 commit 6e47c7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/iface/socket_set.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ impl fmt::Display for SocketHandle {
3737

3838
/// An extensible set of sockets.
3939
///
40-
/// The lifetime `'a` is used when storing a `Socket<'a>`.
40+
/// The lifetime `'a` is used when storing a `Socket<'a>`. If you're using
41+
/// owned buffers for your sockets (passed in as `Vec`s) you can use
42+
/// `SocketSet<'static>`.
4143
#[derive(Debug)]
4244
pub struct SocketSet<'a> {
4345
sockets: ManagedSlice<'a, SocketStorage<'a>>,

0 commit comments

Comments
 (0)