clementine_core::rpc::parser

Function convert_int_to_another

Source
pub fn convert_int_to_another<SOURCE, TARGET>(
    field_name: &str,
    value: SOURCE,
    try_from: fn(_: SOURCE) -> Result<TARGET, TryFromIntError>,
) -> Result<TARGET, Status>
where SOURCE: Copy + Debug + Display,
Expand description

Converts an integer type in to another integer type. This is needed because tonic defaults to wrong integer types for some parameters.