Hello
I am currently documenting a lot. I also want to document private functions and use doctest for that.
I understand that the example will not work when used outside of scope, but I will not build documentation for functions that are private. Anyway I want to document them properly. The compiler complains that the method is private in my documentation.
Is there a way to tell the compiler that documentation on private methods should ignore that used methods are private?
Here a code example:
///removes the upper half of a byte.
/// ```rust
/// use gdtf_parser::utils::units::guid::FixtureTypeGuid;
/// assert_eq!(FixtureTypeGuid::get_lower_halfbyte(0b0000_0100).unwrap(),0b0000_0100);
/// assert_eq!(FixtureTypeGuid::get_lower_halfbyte(0b0010_1100).unwrap(),0b0000_1100);
/// ```
pub(crate) fn get_lower_halfbyte(byte: u8) -> Result<u8, GdtfGuidError> {
let s1 = if Self::is_byte_one_at_index(byte, 4)? { 0b0000_1000_u8 } else { 0 };
let s2 = if Self::is_byte_one_at_index(byte, 5)? { 0b0000_0100_u8 } else { 0 };
let s3 = if Self::is_byte_one_at_index(byte, 6)? { 0b0000_0010_u8 } else { 0 };
let s4 = if Self::is_byte_one_at_index(byte, 7)? { 0b0000_0001_u8 } else { 0 };
Ok(s1 + s2 + s3 + s4)
}