mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-09 05:12:58 +00:00
implement display for copy behavior
This commit is contained in:
@@ -58,7 +58,10 @@ impl MirroringObjectStore {
|
|||||||
|
|
||||||
impl std::fmt::Display for MirroringObjectStore {
|
impl std::fmt::Display for MirroringObjectStore {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
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:")?;
|
writeln!(f, "primary:")?;
|
||||||
self.primary.fmt(f)?;
|
self.primary.fmt(f)?;
|
||||||
writeln!(f, "secondary:")?;
|
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
|
/// An object store that mirrors write to secondary object store first
|
||||||
/// and than commit to primary object store.
|
/// and than commit to primary object store.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user