base/sys/linux/notifiers.rs
1// Copyright 2022 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use std::os::unix::net::UnixStream;
6
7use crate::descriptor::AsRawDescriptor;
8use crate::CloseNotifier;
9use crate::ReadNotifier;
10
11impl ReadNotifier for UnixStream {
12 fn get_read_notifier(&self) -> &dyn AsRawDescriptor {
13 self
14 }
15}
16
17impl CloseNotifier for UnixStream {
18 fn get_close_notifier(&self) -> &dyn AsRawDescriptor {
19 self
20 }
21}