MCPcopy Create free account
hub / github.com/Botloader/botloader / parse_str_snowflake_id

Function parse_str_snowflake_id

components/runtime/src/extensions/mod.rs:78–84  ·  view source on GitHub ↗
(id_str: &str)

Source from the content-addressed store, hash-verified

76}
77
78pub(crate) fn parse_str_snowflake_id(id_str: &str) -> Result<Id<GenericMarker>, AnyError> {
79 if let Some(id) = Id::new_checked(id_str.parse()?) {
80 Ok(id)
81 } else {
82 Err(anyhow::anyhow!("invalid channel id"))
83 }
84}
85
86pub(crate) fn parse_str_snowflake_ids<M>(
87 ids: impl Iterator<Item = String>,

Calls

no outgoing calls

Tested by

no test coverage detected