Skip to content

custom from / into attribute #79

@bokuweb

Description

@bokuweb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions