From cd21cff29942f24ba7d38287186cce64d0e84e56 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Thu, 18 Aug 2022 17:35:02 +0530 Subject: feat(ext/flash): An optimized http/1.1 server (#15405) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk Co-authored-by: Ben Noordhuis Co-authored-by: crowlkats Co-authored-by: Ryan Dahl --- core/resources.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core/resources.rs') diff --git a/core/resources.rs b/core/resources.rs index a4bb3607d..82b079201 100644 --- a/core/resources.rs +++ b/core/resources.rs @@ -64,6 +64,13 @@ pub trait Resource: Any + 'static { /// resource specific clean-ups, such as cancelling pending futures, after a /// resource has been removed from the resource table. fn close(self: Rc) {} + + /// Resources backed by a file descriptor can let ops know to allow for + /// low-level optimizations. + #[cfg(unix)] + fn backing_fd(self: Rc) -> Option { + None + } } impl dyn Resource { -- cgit v1.2.3