Skip to content

Commit

Permalink
refactor(core): Align naming for AccessorDyn (apache#4574)
Browse files Browse the repository at this point in the history
* chore: align naming for AccessorDyn

* chore: align naming for AccessorDyn
  • Loading branch information
morristai authored May 3, 2024
1 parent 95672e5 commit 63e061a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/src/raw/accessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,9 @@ pub trait Access: Send + Sync + Debug + Unpin + 'static {
}
}

/// `AccessorDyn` is the dyn version of [`Access`] make it possible to use as
/// `Box<dyn AccessorDyn>`.
pub trait AccessorDyn: Send + Sync + Debug + Unpin {
/// `AccessDyn` is the dyn version of [`Access`] make it possible to use as
/// `Box<dyn AccessDyn>`.
pub trait AccessDyn: Send + Sync + Debug + Unpin {
/// Dyn version of [`Accessor::info`]
fn info_dyn(&self) -> AccessorInfo;
/// Dyn version of [`Accessor::create_dir`]
Expand Down Expand Up @@ -473,7 +473,7 @@ pub trait AccessorDyn: Send + Sync + Debug + Unpin {
fn blocking_rename_dyn(&self, from: &str, to: &str, args: OpRename) -> Result<RpRename>;
}

impl<A: ?Sized> AccessorDyn for A
impl<A: ?Sized> AccessDyn for A
where
A: Access<
Reader = oio::Reader,
Expand Down Expand Up @@ -599,7 +599,7 @@ where
}
}

impl Access for dyn AccessorDyn {
impl Access for dyn AccessDyn {
type Reader = oio::Reader;
type BlockingReader = oio::BlockingReader;
type Writer = oio::Writer;
Expand Down Expand Up @@ -829,7 +829,7 @@ impl<T: Access + ?Sized> Access for Arc<T> {
}

/// Accessor is the type erased accessor with `Arc<dyn Accessor>`.
pub type Accessor = Arc<dyn AccessorDyn>;
pub type Accessor = Arc<dyn AccessDyn>;

/// Metadata for accessor, users can use this metadata to get information of underlying backend.
#[derive(Clone, Debug, Default)]
Expand Down

0 comments on commit 63e061a

Please sign in to comment.