We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.with
1 parent d5d52d8 commit 6a37d2aCopy full SHA for 6a37d2a
embassy-net/src/udp.rs
@@ -92,7 +92,8 @@ impl<'a> UdpSocket<'a> {
92
}
93
94
95
- fn with<R>(&self, f: impl FnOnce(&udp::Socket, &Interface) -> R) -> R {
+ /// Lock the stack, provide access to the underlying smoltcp UDP socket and interface
96
+ pub fn with<R>(&self, f: impl FnOnce(&udp::Socket, &Interface) -> R) -> R {
97
let s = &*self.stack.borrow();
98
let socket = s.sockets.get::<udp::Socket>(self.handle);
99
f(socket, &s.iface)
0 commit comments