// Copyright 2022 The ChromiumOS Authors1// Use of this source code is governed by a BSD-style license that can be2// found in the LICENSE file.34use crate::descriptor::AsRawDescriptor;56pub trait ReadNotifier {7/// Gets a descriptor that can be used in EventContext to wait for events to be available (e.g.8/// to avoid receive_events blocking).9fn get_read_notifier(&self) -> &dyn AsRawDescriptor;10}1112impl ReadNotifier for std::fs::File {13fn get_read_notifier(&self) -> &dyn AsRawDescriptor {14self15}16}1718pub trait CloseNotifier {19/// Gets a descriptor that can be used in EventContext to wait for the closed event.20fn get_close_notifier(&self) -> &dyn AsRawDescriptor;21}222324