pub fn button(button: &Button) -> Result<(), ComponentValidationError>
Expand description

Ensure that a button is correct.

Errors

Returns an error of type ButtonConflict if both a custom ID and URL are specified.

Returns an error of type ButtonStyle if ButtonStyle::Link is provided and a URL is provided, or if the style is not ButtonStyle::Link and a custom ID is not provided.

Returns an error of type ComponentCustomIdLength if the provided custom ID is too long.

Returns an error of type ComponentLabelLength if the provided button label is too long.