Skip to main content

validate_port

Function validate_port 

Source
pub fn validate_port(port: &u16) -> Result<(), ValidationError>
Expand description

Validate a port number

Requirements:

  • Must be 1-65535 (not 0)

ยงErrors

Returns a validation error if the port is 0.