pub struct CommandRoleValidator;Expand description
Validator for command role
Implementations§
Trait Implementations§
Source§impl Default for CommandRoleValidator
impl Default for CommandRoleValidator
Source§fn default() -> CommandRoleValidator
fn default() -> CommandRoleValidator
Returns the “default value” for a type. Read more
Source§impl RoleValidator for CommandRoleValidator
impl RoleValidator for CommandRoleValidator
Source§fn validate(&self, role: &ParsedRole) -> RoleValidationResult
fn validate(&self, role: &ParsedRole) -> RoleValidationResult
Validates a parsed role
Source§fn requires_target(&self) -> bool
fn requires_target(&self) -> bool
Returns whether this role requires a target
Source§fn allows_display_text(&self) -> bool
fn allows_display_text(&self) -> bool
Returns whether this role allows display text
Source§fn get_suggestions(&self, role: &ParsedRole) -> Vec<String>
fn get_suggestions(&self, role: &ParsedRole) -> Vec<String>
Provides suggestions for fixing role issues
Auto Trait Implementations§
impl Freeze for CommandRoleValidator
impl RefUnwindSafe for CommandRoleValidator
impl Send for CommandRoleValidator
impl Sync for CommandRoleValidator
impl Unpin for CommandRoleValidator
impl UnwindSafe for CommandRoleValidator
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more