MCPcopy Create free account
hub / github.com/CommE2E/comm / parse_integer

Function parse_integer

shared/comm-lib/src/database.rs:433–447  ·  view source on GitHub ↗
(
  attribute_name: impl Into<String>,
  attribute_value: &str,
)

Source from the content-addressed store, hash-verified

431}
432
433pub fn parse_integer<T>(
434 attribute_name: impl Into<String>,
435 attribute_value: &str,
436) -> Result<T, DBItemError>
437where
438 T: FromStr<Err = ParseIntError>,
439{
440 attribute_value.parse::<T>().map_err(|e| {
441 DBItemError::new(
442 attribute_name.into(),
443 Value::String(attribute_value.into()),
444 DBItemAttributeError::InvalidNumberFormat(e),
445 )
446 })
447}
448
449pub mod batch_operations {
450 use aws_sdk_dynamodb::{

Callers 2

parse_feature_configFunction · 0.85
parse_int_attributeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected