Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core): Align naming for AccessorDyn #4574

Merged
merged 3 commits into from
May 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading