TurboSerializable<M> class abstract

Base abstract class for serializable objects in the turbo ecosystem.

All serialization methods are optional and return null by default. Subclasses override only the methods they need.

The type parameter M represents optional metadata (e.g., frontmatter). Defaults to dynamic when not specified.

Constructors

TurboSerializable({M? metaData})
Creates a TurboSerializable instance with optional metaData.

Properties

hashCode int
The hash code for this object.
no setterinherited
metaData → M?
Optional metadata associated with this object.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fromJson<T>(Map<String, dynamic> json) → T?
Creates an instance from a JSON map.
fromMarkdown<T>(String markdown) → T?
Creates an instance from a Markdown string.
fromXml<T>(String xml) → T?
Creates an instance from an XML string.
fromYaml<T>(String yaml) → T?
Creates an instance from a YAML string.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>?
Converts this object to a JSON map.
toMarkdown() String?
Converts this object to a Markdown string.
toString() String
A string representation of this object.
inherited
toXml() String?
Converts this object to an XML string.
toYaml() String?
Converts this object to a YAML string.
validate<T>() → TurboResponse<T>?
Validates the object's state.

Operators

operator ==(Object other) bool
The equality operator.
inherited