MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / from_str

Method from_str

crates/commitlog/src/varchar.rs:18–20  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

16 /// or `None` if the argument is longer than `N` bytes.
17 #[allow(clippy::should_implement_trait)]
18 pub fn from_str(s: &str) -> Option<Self> {
19 (s.len() <= N).then(|| Self { inner: s.into() })
20 }
21
22 /// Construct [`Self`] from a string slice,
23 /// or allocate a new string containing the first `N` bytes of the slice

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected