add a lot of docs and a reference to them in the README
[Mitarbeiter/Tim-Zeitz/stud-rust-base.git] / src / types.rs
index b10ba13729e1571c2f518330c54359f230b85083..03d28f1c73fc2086070171a03632b24c4aad08b6 100644 (file)
@@ -1,6 +1,12 @@
+//! This module contains a few basic type and constant definitions
+
 use std;
 
 use std;
 
+/// Node ids are unsigned 32 bit integers
 pub type NodeId = u32;
 pub type NodeId = u32;
+/// Edge ids are unsigned 32 bit integers
 pub type EdgeId = u32;
 pub type EdgeId = u32;
+/// Edge weights are unsigned 32 bit integers
 pub type Weight = u32;
 pub type Weight = u32;
+/// The `INFINITY` weight is defined so that the check `INFINITY + INFINITY < INFINITY` does not cause any overflows
 pub const INFINITY: Weight = std::u32::MAX / 2;
 pub const INFINITY: Weight = std::u32::MAX / 2;