- Implemented `toString()` in `TaggedMessage`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-03-30 18:26:34 +02:00
parent 4c530dd7cd
commit 8cf731089e
1 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,7 @@
module tristanable.encoding;
import std.conv : to;
/**
* Represents a tagged message that has been decoded
* from its raw byte encoding, this is a tuple of
@ -184,6 +186,16 @@ public final class TaggedMessage
{
this.tag = newTag;
}
/**
* Returns a string representation of the TaggedMessage
*
* Returns: the string represenation
*/
public override string toString()
{
return "TMessage [Tag: "~to!(string)(tag)~", Payload: "~to!(string)(data)~"]";
}
}
/**