pub struct GroupAuthorizationError { /* private fields */ }Expand description
Group authorization failure with the group ID.
Corresponds to Java’s GroupAuthorizationException, error code
Errors::GroupAuthorizationFailed.
Java extends chain:
GroupAuthorizationException -> AuthorizationException ->
InvalidConfigurationException -> ApiException -> KafkaException
Fatal per RequestUtils.isFatalException.
Implementations§
Source§impl GroupAuthorizationError
impl GroupAuthorizationError
Sourcepub fn for_group_id(group_id: impl Into<String>) -> Self
pub fn for_group_id(group_id: impl Into<String>) -> Self
Create a group authorization error for a group ID, formatting the group into the message.
Mirrors Java’s static GroupAuthorizationException.forGroupId(String):
new GroupAuthorizationException("Not authorized to access group: " + groupId, groupId).
Sourcepub fn with_default_message() -> Self
pub fn with_default_message() -> Self
Create a group authorization error with the code’s default message and no group ID.
Mirrors Java’s GroupAuthorizationException(String message) reached via
the Errors.GROUP_AUTHORIZATION_FAILED builder (exception()), where the
message is the default constant and groupId is null.
Sourcepub fn new(group_id: impl Into<String>, message: impl Into<String>) -> Self
pub fn new(group_id: impl Into<String>, message: impl Into<String>) -> Self
Create a group authorization error carrying a custom message.
Mirrors Java’s GroupAuthorizationException(String message, String groupId)
(GroupAuthorizationException.java:22), where the error message is
caller-supplied rather than the default error text.
It is the only Java constructor this struct translates as a constructor —
for_group_id translates the forGroupId static
factory and with_default_message the
Errors one — so the intersection is its own parameter list and it keeps
the plain name (CLAUDE.md §2).
Sourcepub fn kafka_error(&self) -> &KafkaError
pub fn kafka_error(&self) -> &KafkaError
Access the base error.
Source§impl GroupAuthorizationError
impl GroupAuthorizationError
Sourcepub fn source(&self) -> Option<&Error>
pub fn source(&self) -> Option<&Error>
The underlying source, held by the embedded KafkaError base — Java’s
subclass passes its cause up to super(message, cause). Mirrors
Throwable.getCause().
Trait Implementations§
Source§impl Clone for GroupAuthorizationError
impl Clone for GroupAuthorizationError
Source§fn clone(&self) -> GroupAuthorizationError
fn clone(&self) -> GroupAuthorizationError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more