A function that will be called back to provide information about the segment that was just written. This is particularly useful when debugging the serializer to determine which segments were successfully/completely written.
You should use serialize if the concrete/required type of the given parameter is available/can be automatically inferred by the Scala compiler.
serializeAs makes it possible to specify the object type of the given parameter
that type will then be used to pick up the implicit class file element value.