Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. struct cParams {
  2. iInsertMax: i64,
  3. iUpdateMax: i64,
  4. iDeleteMax: i64,
  5. iInstanceMax: i64,
  6. tFirstInstance: bool,
  7. tCreateTables: bool,
  8. tContinue: bool,
  9. }
  10.  
  11. impl cParams {
  12. fn new() -> cParams {
  13. cParams {
  14. iInsertMax: -1,
  15. iUpdateMax: -1,
  16. iDeleteMax: -1,
  17. iInstanceMax: -1,
  18. tFirstInstance: false,
  19. tCreateTables: false,
  20. tContinue: false,
  21. }
  22. }
  23. }
  24.  
  25. impl Default for cParams {
  26. fn default () -> cParams {
  27. cParams {iInsertMax : -1, iUpdateMax : -1, iDeleteMax : -1, iInstanceMax : -1, tFirstInstance : false, tCreateTables : false, tContinue : false}
  28. }
  29. }
  30.  
  31. let p = cParams { iInsertMax: 10, ..Default::default() };
  32.  
  33. #[derive(Default)]
  34. struct cParams {
  35. iInsertMax: Option<u64>,
  36. iUpdateMax: Option<u64>,
  37. iDeleteMax: Option<u64>,
  38. iInstanceMax: Option<u64>,
  39. tFirstInstance: bool,
  40. tCreateTables: bool,
  41. tContinue: bool,
  42. }
  43.  
  44. let p = cParams { iInsertMax: Some(10), ..Default::default() };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement