pub enum IteratorRequest {
Get {
responder: IteratorGetResponder,
},
}
Expand description
An iterator for the key-value store. Note that this protocol makes no guarantee of atomicity -
the values may change between pulls from the iterator. Unlike the Store
protocol above, this
protocol is not @discoverable
: it is not independently published by the component that
implements it, but rather must have one of its two protocol ends transmitted over an existing
FIDL connection.
As is often the case with iterators, the client indicates that they are done with an instance of the iterator by simply closing their end of the connection.
Since the iterator is associated only with the Iterate method, it is declared as closed rather than open. This is because changes to how iteration works are more likely to require replacing the Iterate method completely (which is fine because that method is flexible) rather than evolving the Iterator protocol.
Variants§
Get
Gets the next batch of keys.
The client pulls keys rather than having the server proactively push them, to implement flow control over the messages.
Fields
responder: IteratorGetResponder
Implementations§
Source§impl IteratorRequest
impl IteratorRequest
pub fn into_get(self) -> Option<IteratorGetResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL