Function toInt [src]
Convert self to integer type T.
Returns an error if self cannot be narrowed into the requested type without truncation.
Prototype
pub fn toInt(self: Managed, comptime T: type) ConvertError!T
Parameters
self: Managed
T: type
Possible Errors
Source
pub fn toInt(self: Managed, comptime T: type) ConvertError!T {
return self.toConst().toInt(T);
}