Skip to main content

signrel


Nathaniel
And this crate has a dependency on another crate which we're which is right here, which is signrel. And signrel is a crate that contains a trait called signrel. And what this does is it defines relationships between signed and unsigned types. And this is useful for when you're like, Okay, I want to take an integer in, but now I want that maybe to be generic, but I would now want the signed or unsigned version of that same type. And so you can see the trait here. It's literally just a trait that has relationship between the signed and unsigned variants of a particular integer. And we use that in the uabs to get a unsigned. I don't know if these are used anymore they may or may not be.