[][src]Struct kafka::client::metadata::Partition

pub struct Partition<'a> { /* fields omitted */ }

Metadata about a particular topic partition.

A partition can be seen as either available or not by kafka-rust. "Available" partitions are partitions with an assigned leader broker and can be send messages to or fetched messages from. Non-available partitions are ignored by kafka-rust. Whether or not a partition is currently "available" can be determined by testing for partition.leader().is_some() or more directly through partition.is_available().

Methods

impl<'a> Partition<'a>[src]

pub fn id(&self) -> i32[src]

Retrieves the identifier of this topic partition.

pub fn leader(&self) -> Option<&'a Broker>[src]

Retrieves the current leader broker of this partition - if any. A partition with a leader is said to be "available".

pub fn is_available(&self) -> bool[src]

Determines whether this partition is currently "available". See Partition::leader().

Trait Implementations

impl<'a> Debug for Partition<'a>[src]

Auto Trait Implementations

impl<'a> Unpin for Partition<'a>

impl<'a> Sync for Partition<'a>

impl<'a> Send for Partition<'a>

impl<'a> UnwindSafe for Partition<'a>

impl<'a> RefUnwindSafe for Partition<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,