Debian Codegraph @

src/debouncer_mini.rs

raw symbols SCIP
1 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/::PathBufrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/PathBuf#;
2
3 #[cfg(feature = "serde")]
4 use serderust-analyzer cargo serde 1.0.228 crate/::{Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#, Serializerust-analyzer cargo serde_core 1.0.228 ser/Serialize#};
5
6 /// A debounced event kind.
7 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
8 #[cfg_attr(feature = "serde", derive(Serializerust-analyzer cargo serde_derive 1.0.228 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.228 Deserialize:))]
9 #[non_exhaustive]
10 pub enum DebouncedEventKindrust-analyzer cargo notify-types 2.1.0 debouncer_mini/DebouncedEventKind# {
11 /// No precise events
12 Anyrust-analyzer cargo notify-types 2.1.0 debouncer_mini/DebouncedEventKind#Any#,
13 /// Event but debounce timed out (for example continuous writes)
14 AnyContinuousrust-analyzer cargo notify-types 2.1.0 debouncer_mini/DebouncedEventKind#AnyContinuous#,
15 }
16
17 /// A debounced event.
18 ///
19 /// Does not emit any specific event type on purpose, only distinguishes between an any event and a continuous any event.
20 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
21 #[cfg_attr(feature = "serde", derive(Serializerust-analyzer cargo serde_derive 1.0.228 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.228 Deserialize:))]
22 pub struct DebouncedEventrust-analyzer cargo notify-types 2.1.0 debouncer_mini/DebouncedEvent# {
23 /// Event path
24 pub pathrust-analyzer cargo notify-types 2.1.0 debouncer_mini/DebouncedEvent#path.: PathBufrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/PathBuf#,
25 /// Event kind
26 pub kindrust-analyzer cargo notify-types 2.1.0 debouncer_mini/DebouncedEvent#kind.: DebouncedEventKindrust-analyzer cargo notify-types 2.1.0 debouncer_mini/DebouncedEventKind#,
27 }
28
29 impl DebouncedEventrust-analyzer cargo notify-types 2.1.0 debouncer_mini/DebouncedEvent# {
30 #[inline(always)]
31 pub fn newrust-analyzer cargo notify-types 2.1.0 debouncer_mini/impl#[DebouncedEvent]new().(path: PathBufrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/PathBuf#, kind: DebouncedEventKindrust-analyzer cargo notify-types 2.1.0 debouncer_mini/DebouncedEventKind#) -> Selfrust-analyzer cargo notify-types 2.1.0 debouncer_mini/impl#[DebouncedEvent] {
32 Selfrust-analyzer cargo notify-types 2.1.0 debouncer_mini/impl#[DebouncedEvent] { pathrust-analyzer cargo notify-types 2.1.0 debouncer_mini/DebouncedEvent#path., kindrust-analyzer cargo notify-types 2.1.0 debouncer_mini/DebouncedEvent#kind. }
33 }
34 }