am-kantox / estructura

Extensions for Elixir structures
MIT License
25 stars 1 forks source link

Default coercions, validations and generations for basic types #5

Open am-kantox opened 2 years ago

am-kantox commented 2 years ago

Might be borrowed from here: https://github.com/am-kantox/tyyppi/tree/master/lib/tyyppi/value

TwistingTwists commented 2 years ago

I find this library useful.

Can you hint as to where to implement the default coercions in present library ?

am-kantox commented 2 years ago

It is described in the docs, there is also an example in tests/support/structs.ex

You should pass the respective keyword parameter to use Estructura and implement coerce_foo functions.

El mié., 6 abr. 2022 15:58, Abhishek Tripathi @.***> escribió:

I find this library useful.

Can you hint as to where to implement the default coercions in present library ?

— Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_am-2Dkantox_estructura_issues_5-23issuecomment-2D1090305356&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=ZLWaJGL9nj09I1FWtXncPnNdwec4eP13nFJ24G9d8HQ&s=MUwlvN2UhD8V7Q4mpdjcZcjem7zAaLugQsHYq1-mR64&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACW4QNQ27SZS4OXVZZXLVQTVDWJ7BANCNFSM5MRP676Q&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=ZLWaJGL9nj09I1FWtXncPnNdwec4eP13nFJ24G9d8HQ&s=6MH8z5_uwtxjZ4Wm96YFe5IayDTX0GB79j3rmQ_4WL8&e= . You are receiving this because you authored the thread.Message ID: @.***>