Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

prelude.rs 772 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  1. pub use std::path::{Path, PathBuf};
  2. pub use std::borrow::Cow;
  3. pub use std::convert::{TryFrom, TryInto};
  4. pub use anyhow::{Result, Error, anyhow};
  5. pub use log::*;
  6. pub use structopt::StructOpt;
  7. pub use fallible_iterator::FallibleIterator;
  8. pub use crate::io::LineProcessor;
  9. pub use crate::io::ObjectWriter;
  10. pub use crate::io::DataSink;
  11. pub use crate::io::path_list;
  12. pub use crate::io::file_size;
  13. pub use crate::json_from_str;
  14. pub use crate::util::Timer;
  15. pub use crate::cli::Command;
  16. /// Macro to implement FromStr using JSON.
  17. #[macro_export]
  18. macro_rules! json_from_str {
  19. ($name:ident) => {
  20. impl FromStr for $name {
  21. type Err = serde_json::Error;
  22. fn from_str(s: &str) -> serde_json::Result<$name> {
  23. return serde_json::from_str(s)
  24. }
  25. }
  26. }
  27. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...