MCPcopy Create free account
hub / github.com/RustCrypto/utils / new

Method new

sponge-cursor/src/lib.rs:39–45  ·  view source on GitHub ↗
(pos: u8)

Source from the content-addressed store, hash-verified

37 /// Returns `None` if `pos` is bigger or equal to `RATE`.
38 #[must_use]
39 pub fn new(pos: u8) -> Option<Self> {
40 if usize::from(pos) < RATE {
41 Some(Self { pos })
42 } else {
43 None
44 }
45 }
46
47 /// Get current cursor position as `u8`.
48 #[must_use]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected