pub trait DictionaryDrainIteratorServerHandler<___T: Transport> {
// Required method
fn get_next(
&mut self,
sender: &ServerSender<___T, DictionaryDrainIterator>,
request: RequestBuffer<___T, GetNext>,
responder: Responder<GetNext>,
);
// Provided method
fn on_unknown_interaction(
&mut self,
sender: &ServerSender<___T, DictionaryDrainIterator>,
ordinal: u64,
) { ... }
}
Expand description
A server handler for the DictionaryDrainIterator protocol.
See DictionaryDrainIterator
for more details.
Required Methods§
Sourcefn get_next(
&mut self,
sender: &ServerSender<___T, DictionaryDrainIterator>,
request: RequestBuffer<___T, GetNext>,
responder: Responder<GetNext>,
)
fn get_next( &mut self, sender: &ServerSender<___T, DictionaryDrainIterator>, request: RequestBuffer<___T, GetNext>, responder: Responder<GetNext>, )
Returns the next batch of results for a [Dictionary.Drain] call, returning up to
limit
results. limit
can be at most MAX_DICTIONARY_ITERATOR_CHUNK.
Each returned capability will be assigned a monotonically increasing CapabilityId starting
from start_id
.
In addition to the items
, returns end_id
, which is one more than the highest id reserved
by [GetNext]. end_id
can be used as the start_id
for the next call to [GetNext].
If [GetNext] returns an error, the server will also close the channel.
Errors:
ID_ALREADY_EXISTS
if some id in the range[start_id, limit)
already exists in this store.INVALID_ARGS
iflimit
was0
or greater thanMAX_DICTIONARY_ITERATOR_CHUNK
.