gix_merge/blob/builtin_driver/
mod.rsuse crate::blob::BuiltinDriver;
impl BuiltinDriver {
pub fn as_str(&self) -> &str {
match self {
BuiltinDriver::Text => "text",
BuiltinDriver::Binary => "binary",
BuiltinDriver::Union => "union",
}
}
pub fn all() -> &'static [Self] {
&[BuiltinDriver::Text, BuiltinDriver::Binary, BuiltinDriver::Union]
}
pub fn by_name(name: &str) -> Option<Self> {
Self::all().iter().find(|variant| variant.as_str() == name).copied()
}
}
pub mod binary;
pub use binary::function::merge as binary;
pub mod text;
pub use text::function::merge as text;