NewTypedMarshaler
Creates a new typed marshaler. It takes a marshaler and a type T. It returns a typed marshaler that can be used to marshal and unmarshal values of type T. If T is a pointer type, it will unmarshal into a new instance of T. Otherwise, it will unmarshal into a new instance of *T.
def NewTypedMarshaler(
marshaler: *Marshaler
) - > *TypedMarshaler[T]
Creates a new typed marshaler. It takes a marshaler and a type T. It returns a typed marshaler that can be used to marshal and unmarshal values of type T. If T is a pointer type, it will unmarshal into a new instance of T. Otherwise, it will unmarshal into a new instance of *T.
Parameters
| Name | Type | Description |
|---|---|---|
| marshaler | *Marshaler | The base marshaler to be wrapped, providing the underlying marshaling and unmarshaling capabilities. |
Returns
| Type | Description |
|---|---|
*TypedMarshaler[T] | A new typed marshaler configured to handle values of type T. |