pub struct Resource { /* private fields */ }Expand description
Represents a cluster resource with a tuple of (type, name).
Corresponds to org.apache.kafka.common.resource.Resource.
Implementations§
Source§impl Resource
impl Resource
Sourcepub const CLUSTER_NAME: &str = "kafka-cluster"
pub const CLUSTER_NAME: &str = "kafka-cluster"
The name of the CLUSTER resource.
Sourcepub fn new(resource_type: ResourceType, name: impl Into<String>) -> Resource
pub fn new(resource_type: ResourceType, name: impl Into<String>) -> Resource
Create an instance of this class with the provided parameters.
§Arguments
resource_type- resource typename- resource name
Sourcepub fn resource_type(&self) -> ResourceType
pub fn resource_type(&self) -> ResourceType
Return the resource type.
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Return true if this Resource has any UNKNOWN components.
Trait Implementations§
impl Eq for Resource
impl StructuralPartialEq for Resource
Auto Trait Implementations§
impl Freeze for Resource
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnsafeUnpin for Resource
impl UnwindSafe for Resource
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