caffeine_lang/common/accepted_types
Types
AcceptedTypes is a union of all the types that can be used as filters. It is recursive to allow for nested filters. This may be a bug in the future since it seems it may infinitely recurse.
pub type AcceptedTypes {
Boolean
Float
Integer
String
Dict(AcceptedTypes, AcceptedTypes)
List(AcceptedTypes)
Modifier(ModifierTypes)
}
Constructors
-
Boolean -
Float -
Integer -
String -
Dict(AcceptedTypes, AcceptedTypes) -
List(AcceptedTypes) -
Modifier(ModifierTypes)
the attribute they are bound to.
pub type ModifierTypes {
Optional(AcceptedTypes)
Defaulted(AcceptedTypes, String)
}
Constructors
-
Optional(AcceptedTypes) -
Defaulted(AcceptedTypes, String)Defaulted type stores the inner type and its default value as a string e.g., Defaulted(Integer, “10”) means an optional integer with default 10
Values
pub fn accepted_type_to_string(
accepted_type: AcceptedTypes,
) -> String
Converts an AcceptedTypes to its string representation.