FluentValue

@Serializable
sealed class FluentValue(source)

FluentValue represents any value that can be used in Fluent patterns. Corresponds to Rust's FluentValue enum.

Inheritors

Types

Link copied to clipboard
@Serializable
data class Custom(val value: FluentType) : FluentValue

A custom type value.

Link copied to clipboard
@Serializable
data class Error(val message: String) : FluentValue

An error value.

Link copied to clipboard
@Serializable
data object None : FluentValue

Represents no value (null equivalent).

Link copied to clipboard
@Serializable
data class Number(val value: FluentNumber) : FluentValue

A number value with optional formatting.

Link copied to clipboard
@Serializable
data class Pattern(val pattern: Pattern) : FluentValue

A pattern value (returned for attribute references to allow proper select handling).

Link copied to clipboard
@Serializable
data class Str(val value: String) : FluentValue

A string value.

Functions

Link copied to clipboard
fun asAny(): Any?

Get the underlying value as Any.

Link copied to clipboard

Convert FluentValue to display string.