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 ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.