mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-26 22:59:57 +00:00
implement display for copy behavior
This commit is contained in:
@@ -58,7 +58,10 @@ impl MirroringObjectStore {
|
||||
|
||||
impl std::fmt::Display for MirroringObjectStore {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
writeln!(f, "MirroringObjectStore")?;
|
||||
write!(f, "MirroringObjectStore(secondary_copy_behavior=")?;
|
||||
self.secondary_copy_behavior.fmt(f)?;
|
||||
writeln!(f, ")")?;
|
||||
|
||||
writeln!(f, "primary:")?;
|
||||
self.primary.fmt(f)?;
|
||||
writeln!(f, "secondary:")?;
|
||||
@@ -94,6 +97,17 @@ impl Default for MirroringSecondaryCopy {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for MirroringSecondaryCopy {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::Copy => write!(f, "Copy"),
|
||||
Self::SkipIfNotFound => write!(f, "SkipIfNotFound"),
|
||||
}?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// An object store that mirrors write to secondary object store first
|
||||
/// and than commit to primary object store.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user