Domani connects your domain to whatever you want to host on it, all with no account needed
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
domani/src/origin.rs

26 lines
589 B

use crate::error::unexpected;
mod descr;
pub use self::descr::Descr;
pub mod store;
#[derive(thiserror::Error, Debug)]
pub enum ReadFileIntoError {
#[error("file not found")]
FileNotFound,
#[error(transparent)]
Unexpected(#[from] unexpected::Error),
}
#[mockall::automock]
/// Describes an origin which has already been synced locally and is available for reading files
/// from.
pub trait Origin {
fn descr(&self) -> &Descr;
fn read_file_into(
&self,
path: &str,
into: &mut dyn std::io::Write,
) -> Result<(), ReadFileIntoError>;
}