pub struct Node { /* private fields */ }Expand description
Information about a Kafka node.
Implementations§
Source§impl Node
impl Node
Sourcepub fn new(id: i32, host: String, port: i32) -> Self
pub fn new(id: i32, host: String, port: i32) -> Self
Creates a new Node with no rack and not fenced.
Sourcepub fn with_rack(id: i32, host: String, port: i32, rack: Option<String>) -> Self
pub fn with_rack(id: i32, host: String, port: i32, rack: Option<String>) -> Self
Creates a new Node with the given rack.
Sourcepub fn with_rack_is_fenced(
id: i32,
host: String,
port: i32,
rack: Option<String>,
is_fenced: bool,
) -> Self
pub fn with_rack_is_fenced( id: i32, host: String, port: i32, rack: Option<String>, is_fenced: bool, ) -> Self
Creates a new Node with the given rack and fenced status.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Check whether this node is empty, which may be the case if no_node() is used
as a placeholder in a response payload with an error.
Trait Implementations§
impl Eq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more