Resultados da pesquisa a pedido "ord"
Como implementar Ord para uma estrutura?
Eu já vi uma pergunta semelhante a esta, mas ninguém me diz exatamente como implementarOrd para uma estrutura. Por exemplo, o seguinte: struct SomeNum { name: String, value: u32, } impl Ord for SomeNum { fn cmp(&self, other:&Self) -> Ordering { ...