NAME
TUI::Objects::Streamable - defines the role TStreamable
DESCRIPTION
TStreamable identifies objects that participate in the TUI::Vision object persistence mechanism.
Classes performing this role must implement write and read. write stores the persistent state of an object in a TStream, while read restores that state from a stream.
TStream recognizes objects performing this role and preserves their object identity when the persistent object graph is reconstructed.
REQUIRED METHODS
read
$self = $self->read($stream);
Restores the persistent state of the object from $stream. Returns the updated object.
write
$self->write($stream);
Writes the persistent state of the object to $stream.
SEE ALSO
AUTHOR
J. Schneider <brickpool@cpan.org>
COPYRIGHT AND LICENSE
Copyright (c) 2021-2026 the "AUTHOR" as listed above.
This software is licensed under the MIT license (see the LICENSE file, which is part of the distribution).