Cargo Features

[dependencies]
rust-persian-tools = { version = "1.1.4", default-features = false, features = ["full", "add-ordinal-suffix", "commas", "digits", "find-capital-by-province", "persian-chars", "arabic-chars", "national-id", "remove-ordinal-suffix", "url-fix", "number-plate", "phone-number", "verity-card-number", "serde", "bill", "number-to-words", "get-bank-name-by-card-number", "extract-card-number", "time-diff", "get-place-by-iran-national-id", "half-space", "legal-id", "words-to-number", "sheba"] }

Edit Makefile and src/lib.src after making changes in this section:

full default = add-ordinal-suffix, arabic-chars, bill, commas, digits, extract-card-number, find-capital-by-province, get-bank-name-by-card-number, get-place-by-iran-national-id, half-space, legal-id, national-id, number-plate, number-to-words, persian-chars, phone-number, remove-ordinal-suffix, sheba, time-diff, url-fix, verity-card-number, words-to-number

For now, by default we enable all features:

default = full

The full feature is set by default whenever rust-persian-tools is added without default-features = false somewhere in the dependency tree.

add-ordinal-suffix full

Affects rust-persian-tools::add_ordinal_suffix

commas full number-to-words? words-to-number?

Affects rust-persian-tools::commas

digits full time-diff? words-to-number?

Affects rust-persian-tools::digits

find-capital-by-province full = persian-chars

Affects rust-persian-tools::find_capital_by_province

persian-chars find-capital-by-province? full

Affects rust-persian-tools::persian_chars, rust-persian-tools::arabic_chars

arabic-chars full
national-id full

Enables thiserror ^1.0.59

Affects rust-persian-tools::national_id

remove-ordinal-suffix full words-to-number?

Affects rust-persian-tools::remove_ordinal_suffix

url-fix full

Enables urlencoding

Affects rust-persian-tools::url_fix

number-plate full

Affects rust-persian-tools::number_plate

phone-number full

Enables thiserror ^1.0.59

Affects rust-persian-tools::phone_number

verity-card-number full

Enables thiserror ^1.0.59

Affects rust-persian-tools::verity_card_number

serde

Enables serde

Affects national_id::serde

bill full

Enables num, num-derive, num-traits, and thiserror ^1.0.59

Affects rust-persian-tools::bill

number-to-words full = commas

Enables thiserror ^1.0.59

Affects rust-persian-tools::number_to_words

get-bank-name-by-card-number full

Enables thiserror ^1.0.59

Affects rust-persian-tools::get_bank_name_by_card_number

extract-card-number full

Affects rust-persian-tools::extract_card_number

time-diff full = digits

Enables chrono and thiserror ^1.0.59

Affects rust-persian-tools::time_diff

get-place-by-iran-national-id full

Enables thiserror ^1.0.59

Affects rust-persian-tools::get_place_by_iran_national_id

half-space full

Affects rust-persian-tools::half_space

Enables thiserror ^1.0.59

Affects rust-persian-tools::legal_id

words-to-number full = commas, digits, remove-ordinal-suffix

Enables thiserror ^1.0.59

Affects rust-persian-tools::words_to_number

sheba full

Enables thiserror ^1.0.59

Affects rust-persian-tools::sheba