Header menu logo Xanthos

RaceId Module

Functions for creating and working with RaceId values.

Functions and values

Function or value Description

create value

Full Usage: create value

Parameters:
    value : string - The race identifier string.

Returns: Result<RaceId, XanthosError> Ok(RaceId) if valid, Error with validation message if invalid.

Creates a RaceId with validation.

Validation rules: - Must not be empty or whitespace - Must be at least 8 characters (YYYYMMDD minimum) - First 8 characters must form a valid date in yyyyMMdd format - Remaining characters (if any) must be alphanumeric

value : string

The race identifier string.

Returns: Result<RaceId, XanthosError>

Ok(RaceId) if valid, Error with validation message if invalid.

unsafe value

Full Usage: unsafe value

Parameters:
    value : string - The race identifier string (must be valid).

Returns: RaceId A RaceId wrapping the given value.

Creates a RaceId without validation. Use only for trusted input.

value : string

The race identifier string (must be valid).

Returns: RaceId

A RaceId wrapping the given value.

value arg1

Full Usage: value arg1

Parameters:
Returns: string The raw string identifier.

Extracts the underlying string value from a RaceId.

arg0 : RaceId
Returns: string

The raw string identifier.

Type something to start searching.