File tree 11 files changed +47
-0
lines changed 11 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## notify 9.0.0 (unreleased)
4
+ - FEATURE: added support for the [ ` flume ` ] ( https://docs.rs/flume ) crate
5
+
3
6
## debouncer-full 0.6.0 (unreleased)
4
7
- FEATURE: allow ` FileIdCache ` trait implementations to choose ownership of the returned file-ids
8
+ - FEATURE: added support for the [ ` flume ` ] ( https://docs.rs/flume ) crate
9
+
10
+ ## debouncer-mini 0.7.0 (unreleased)
11
+ - FEATURE: added support for the [ ` flume ` ] ( https://docs.rs/flume ) crate
5
12
6
13
## file-id 0.2.3 (unreleased)
7
14
- CHANGE: implement ` AsRef<FileId> ` for ` FileId `
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ edition = "2021"
21
21
[workspace .dependencies ]
22
22
bitflags = " 2.7.0"
23
23
crossbeam-channel = " 0.5.0"
24
+ flume = " 0.11.1"
24
25
deser-hjson = " 2.2.4"
25
26
env_logger = " 0.11.2"
26
27
file-id = { version = " 0.2.2" , path = " file-id" }
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ default = ["macos_fsevent"]
17
17
serde = [" notify-types/serde" ]
18
18
web-time = [" notify-types/web-time" ]
19
19
crossbeam-channel = [" dep:crossbeam-channel" , " notify/crossbeam-channel" ]
20
+ flume = [" dep:flume" , " notify/flume" ]
20
21
macos_fsevent = [" notify/macos_fsevent" ]
21
22
macos_kqueue = [" notify/macos_kqueue" ]
22
23
serialization-compat-6 = [" notify/serialization-compat-6" ]
@@ -25,6 +26,7 @@ serialization-compat-6 = ["notify/serialization-compat-6"]
25
26
notify.workspace = true
26
27
notify-types.workspace = true
27
28
crossbeam-channel = { workspace = true , optional = true }
29
+ flume = { workspace = true , optional = true }
28
30
file-id.workspace = true
29
31
walkdir.workspace = true
30
32
log.workspace = true
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ A debouncer for [notify] that is optimized for ease of use.
16
16
17
17
- ` crossbeam-channel ` passed down to notify, off by default
18
18
19
+ - ` flume ` passed down to notify, off by default
20
+
19
21
- ` serialization-compat-6 ` passed down to notify, off by default
20
22
21
23
[ docs ] : https://docs.rs/notify-debouncer-full
Original file line number Diff line number Diff line change 52
52
//! - `serde` passed down to notify-types, off by default
53
53
//! - `web-time` passed down to notify-types, off by default
54
54
//! - `crossbeam-channel` passed down to notify, off by default
55
+ //! - `flume` passed down to notify, off by default
55
56
//! - `macos_fsevent` passed down to notify, off by default
56
57
//! - `macos_kqueue` passed down to notify, off by default
57
58
//! - `serialization-compat-6` passed down to notify, off by default
@@ -132,6 +133,13 @@ impl DebounceEventHandler for crossbeam_channel::Sender<DebounceEventResult> {
132
133
}
133
134
}
134
135
136
+ #[ cfg( feature = "flume" ) ]
137
+ impl DebounceEventHandler for flume:: Sender < DebounceEventResult > {
138
+ fn handle_event ( & mut self , event : DebounceEventResult ) {
139
+ let _ = self . send ( event) ;
140
+ }
141
+ }
142
+
135
143
impl DebounceEventHandler for std:: sync:: mpsc:: Sender < DebounceEventResult > {
136
144
fn handle_event ( & mut self , event : DebounceEventResult ) {
137
145
let _ = self . send ( event) ;
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ repository.workspace = true
16
16
default = [" macos_fsevent" ]
17
17
serde = [" notify-types/serde" ]
18
18
crossbeam-channel = [" dep:crossbeam-channel" , " notify/crossbeam-channel" ]
19
+ flume = [" dep:flume" , " notify/flume" ]
19
20
macos_fsevent = [" notify/macos_fsevent" ]
20
21
macos_kqueue = [" notify/macos_kqueue" ]
21
22
serialization-compat-6 = [" notify/serialization-compat-6" ]
@@ -24,5 +25,6 @@ serialization-compat-6 = ["notify/serialization-compat-6"]
24
25
notify.workspace = true
25
26
notify-types.workspace = true
26
27
crossbeam-channel = { workspace = true , optional = true }
28
+ flume = { workspace = true , optional = true }
27
29
log.workspace = true
28
30
tempfile.workspace = true
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ Tiny debouncer for [notify]. Filters incoming events and emits only one event pe
8
8
9
9
- ` crossbeam-channel ` passed down to notify, off by default
10
10
11
+ - ` flume ` passed down to notify, off by default
12
+
11
13
- ` serde ` for serde support of event types, off by default
12
14
13
15
- ` serialization-compat-6 ` passed down to notify, off by default
Original file line number Diff line number Diff line change 47
47
//!
48
48
//! - `serde` passed down to notify-types, off by default
49
49
//! - `crossbeam-channel` passed down to notify, off by default
50
+ //! - `flume` passed down to notify, off by default
50
51
//! - `macos_fsevent` passed down to notify, off by default
51
52
//! - `macos_kqueue` passed down to notify, off by default
52
53
//! - `serialization-compat-6` passed down to notify, off by default
@@ -161,6 +162,13 @@ impl DebounceEventHandler for crossbeam_channel::Sender<DebounceEventResult> {
161
162
}
162
163
}
163
164
165
+ #[ cfg( feature = "flume" ) ]
166
+ impl DebounceEventHandler for flume:: Sender < DebounceEventResult > {
167
+ fn handle_event ( & mut self , event : DebounceEventResult ) {
168
+ let _ = self . send ( event) ;
169
+ }
170
+ }
171
+
164
172
impl DebounceEventHandler for std:: sync:: mpsc:: Sender < DebounceEventResult > {
165
173
fn handle_event ( & mut self , event : DebounceEventResult ) {
166
174
let _ = self . send ( event) ;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ serialization-compat-6 = ["notify-types/serialization-compat-6"]
27
27
[dependencies ]
28
28
notify-types.workspace = true
29
29
crossbeam-channel = { workspace = true , optional = true }
30
+ flume = { workspace = true , optional = true }
30
31
filetime.workspace = true
31
32
libc.workspace = true
32
33
log.workspace = true
Original file line number Diff line number Diff line change @@ -262,6 +262,13 @@ impl EventHandler for crossbeam_channel::Sender<Result<Event>> {
262
262
}
263
263
}
264
264
265
+ #[ cfg( feature = "flume" ) ]
266
+ impl EventHandler for flume:: Sender < Result < Event > > {
267
+ fn handle_event ( & mut self , event : Result < Event > ) {
268
+ let _ = self . send ( event) ;
269
+ }
270
+ }
271
+
265
272
impl EventHandler for std:: sync:: mpsc:: Sender < Result < Event > > {
266
273
fn handle_event ( & mut self , event : Result < Event > ) {
267
274
let _ = self . send ( event) ;
Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ impl ScanEventHandler for crossbeam_channel::Sender<ScanEvent> {
43
43
}
44
44
}
45
45
46
+ #[ cfg( feature = "flume" ) ]
47
+ impl ScanEventHandler for flume:: Sender < ScanEvent > {
48
+ fn handle_event ( & mut self , event : ScanEvent ) {
49
+ let _ = self . send ( event) ;
50
+ }
51
+ }
52
+
46
53
impl ScanEventHandler for std:: sync:: mpsc:: Sender < ScanEvent > {
47
54
fn handle_event ( & mut self , event : ScanEvent ) {
48
55
let _ = self . send ( event) ;
You can’t perform that action at this time.
0 commit comments