arrsingh_lists/
lib.rs

1/// A struct that holds a value of type [`u8`]
2pub struct SomeStruct {
3    val: u8,
4}
5
6impl SomeStruct {
7    ///Constructor: Creates and returns a new instance of SomeStruct
8    pub fn new(val: u8) -> SomeStruct {
9        SomeStruct { val }
10    }
11
12    /// Returns the value of val
13    pub fn value(&self) -> u8 {
14        self.val
15    }
16}