pub fn unsupported_version_err<T: UnsupportedVersionErr>(
context: &'static str,
got: u8,
) -> T
Expand description
Helper function to create an “unsupported version” error.
This function is a convenience wrapper around the UnsupportedVersionErr
trait.
§Arguments
context
- The context in which the error occurred.got
- The unsupported version received.
§Returns
A new error instance of type T
that implements UnsupportedVersionErr
.