1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! API to consume a response when a client write request is completed.
pub
pub
pub use OneshotResponder;
pub use ProgressResponder;
use since;
use crateOptionalSend;
use crateRaftTypeConfig;
use crateLogIdOf;
/// A trait that lets `RaftCore` send a result back to the client or to somewhere else.
///
/// This is a generic abstraction for sending results of any type `T`.
/// Usually an implementation of [`Responder`] is a oneshot channel Sender.
///
/// ## Lifecycle Callbacks
///
/// - [`on_commit()`](Self::on_commit): Called when locally committed (optional)
/// - [`on_complete()`](Self::on_complete): Sends the final result
///
/// # Type Parameters
///
/// - `T`: The type of value to send through this responder