raiden-dynamo
                                
                                 raiden-dynamo copied to clipboard
                                
                                    raiden-dynamo copied to clipboard
                            
                            
                            
                        custom from / into attribute
Is your feature request related to a problem? Please describe.
I'd like to support custom from / into attribute function.
Describe the solution you'd like
Can this feature be realized by the following?
#[derive(Raiden)]
struct Foo {
  id: String
  #[raiden(from_fn(custom_fn))]
  greeting: String
}
fn custom_fn(value: Option<raiden::AttributeValue>) -> Result<String, RaidenError>  {
  // ... convert attribute to String
}
Describe alternatives you've considered
NA
Additional context
NA
#[derive(Raiden)]
struct Foo {
  id: String
  #[raiden(from_attr_fn(custom_fn))]
  greeting: String
}
impl Foo {
  fn custom_attr_fn(value: Option<raiden::AttributeValue>) -> Result<String, RaidenError>  {
    // ... convert attribute to String
  }
}
I'd like to add from_attr_map_fn like following too.
#[derive(Raiden)]
struct Foo {
  id: String
  #[raiden(from_attr_map_fn(custom_fn))]
  greeting: String
}
impl Foo {
  fn custom_attr_map_fn(map: &HashMap<String, AttributeValue>) -> Result<String, RaidenError>  {
    // ... convert attribute to String
  }
}