[−][src]Struct kafka::client::metadata::Partition
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
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,