pub mod error;
pub mod rust;
pub use error::{EgError, Result};
use std::path::PathBuf;
pub struct Eg;
impl Eg {
pub fn rust_crate(name: &str) -> rust::RustCrateSearch {
rust::RustCrateSearch::new(name)
}
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SearchResult {
pub version: String,
pub checkout_path: PathBuf,
pub example_matches: Vec<Match>,
pub other_matches: Vec<Match>,
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct Match {
pub file_path: PathBuf,
pub line_number: u32,
pub line_content: String,
pub context_before: Vec<String>,
pub context_after: Vec<String>,
}