use crate::binder::Binder;
use crate::environment::{Environment, ProcessEnvironment};
use crate::error::BindError;
pub trait ParameterSource: Sized {
fn bind<E: Environment>(binder: &Binder<E>) -> Result<Self, BindError>;
fn from_environment<E: Environment>(environment: E) -> Result<Self, BindError> {
Self::bind(&Binder::new(environment))
}
fn from_process_environment() -> Result<Self, BindError> {
Self::from_environment(ProcessEnvironment)
}
}