pub struct TopicPartitionList { /* private fields */ }
Expand description

A structure to store and manipulate a list of topics and partitions with optional offsets.

Implementations§

Creates a new empty list with default capacity.

Creates a new empty list with the specified capacity.

Given a topic map, generates a new TopicPartitionList.

Returns the pointer to the internal librdkafka structure.

Returns the number of elements in the list.

Returns the capacity of the list.

Adds a topic with unassigned partitions to the list.

Adds a topic and partition to the list.

Adds a topic and partition range to the list.

Sets the offset for an already created topic partition. It will fail if the topic partition isn’t in the list.

Adds a topic and partition to the list, with the specified offset.

Given a topic name and a partition number, returns the corresponding list element.

Sets all partitions in the list to the specified offset.

Returns all the elements of the list.

Returns all the elements of the list that belong to the specified topic.

Returns a hashmap-based representation of the list.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.