Comments (2)
added Either faker for String, https://github.com/cksac/fake-rs/blob/master/fake/examples/utils.rs
use fake::faker::phone_number::en::{CellNumber, PhoneNumber};
use fake::{utils::either, Dummy, Fake, Faker};
#[derive(Debug, Dummy)]
struct Foo {
#[dummy(faker = "either(PhoneNumber(), CellNumber())")]
phone_number: String,
}
from fake-rs.
Thanks @cksac
from fake-rs.
Related Issues (20)
- Ability to create an '&str' without a temporary value HOT 6
- Error calling fake() on Sentences: the trait bound `str: Dummy<fake::faker::lorem::raw::Sentences<EN>>` is not satisfied
- Improve docs for Dummy derive
- Is there a way to force all `Option` members to be `Some(foo)`? HOT 2
- Changelog missing
- field_options::struct_type::no_overrides test fails on 32-bit x86 (i686) HOT 1
- Add ISIN to Finance HOT 1
- Is it possible to do a 'partial' fake? HOT 4
- Are there plans to support generating international phone numbers? HOT 2
- Github tags missing
- Vec of Barcodes please HOT 2
- Range without an end causes: Uniform::new_inclusive: range overflow HOT 1
- Implement `Dummy` for `Cow` HOT 2
- Error when defining custom struct with Dummy data from fake-rs HOT 1
- More support for chrono::DateTime HOT 2
- Generate IBAN and other bank account identifiers HOT 1
- Typo in company::CatchPhase ? HOT 1
- Year Zero does not exist HOT 1
- Similar methods HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fake-rs.