Skip to main content

AclBinding

Struct AclBinding 

Source
pub struct AclBinding {
    pub resource_type: i8,
    pub resource_name: String,
    pub pattern_type: i8,
    pub principal: String,
    pub host: String,
    pub operation: i8,
    pub permission: i8,
}
Expand description

One ACL binding for CreateAcls / DescribeAcls.

Fields§

§resource_type: i8

Kafka resource type (ACL_RESOURCE_TOPIC, AclResourceType::Topic, …).

§resource_name: String

Resource name (topic name, …).

§pattern_type: i8

Pattern type (ACL_PATTERN_LITERAL, AclPatternType::Literal, …). Omitted on the wire at v0; decode fills LITERAL.

§principal: String

Principal, for example User:alice.

§host: String

Host filter (* is any).

§operation: i8

Operation (ACL_OPERATION_ALL, AclOperation::All, …).

§permission: i8

Permission (ACL_PERMISSION_ALLOW, AclPermission::Allow, …).

Implementations§

Source§

impl AclBinding

Source

pub fn allow( resource_type: impl Into<i8>, name: impl Into<String>, principal: impl Into<String>, ) -> Self

Allow every operation on name for principal from any host.

Source

pub fn allow_topic( topic: impl Into<String>, principal: impl Into<String>, ) -> Self

Allow every operation on topic for principal from any host.

Source

pub fn host(self, host: impl Into<String>) -> Self

Host filter (* is any).

Source

pub fn pattern_type(self, pattern_type: impl Into<i8>) -> Self

Resource pattern type (AclPatternType::Literal, …).

Source

pub fn operation(self, operation: impl Into<i8>) -> Self

Operation (AclOperation::All, …).

Source

pub fn permission(self, permission: impl Into<i8>) -> Self

Permission (AclPermission::Allow, …).

Source

pub fn new(pattern: ResourcePattern, entry: AccessControlEntry) -> Self

Java AclBinding(ResourcePattern, AccessControlEntry).

Source

pub fn pattern(&self) -> ResourcePattern

Java AclBinding.pattern.

Source

pub fn entry(&self) -> AccessControlEntry

Java AclBinding.entry.

Source

pub fn is_unknown(&self) -> bool

Java AclBinding.isUnknown.

Source

pub fn to_filter(&self) -> AclBindingFilter

Java AclBinding.toFilter.

Trait Implementations§

Source§

impl Clone for AclBinding

Source§

fn clone(&self) -> AclBinding

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AclBinding

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for AclBinding

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for AclBinding

Source§

impl PartialEq for AclBinding

Source§

fn eq(&self, other: &AclBinding) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for AclBinding

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more