opendal_core/docs/internals/mod.rs
1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements. See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership. The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License. You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied. See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18//! The internal implementation details of OpenDAL.
19//!
20//! This guide explains the extension boundaries used to implement OpenDAL
21//! storage services and layers. Application code should use the public
22//! [`Operator`] API; the raw APIs described here can change between minor
23//! releases.
24//!
25//! OpenDAL keeps service implementations typed until it composes them into an
26//! operator:
27//!
28//! ```text
29//! Builder -> Service -> ServiceDyn -> Servicer -> Layer stack -> Operator
30//! ^ |
31//! +------ type erasure ------+
32//! ```
33//!
34//! - A [`Service`] implements storage operations and reports the capabilities
35//! it provides.
36//! - [`ServiceDyn`] is the object-safe boundary that erases a typed service
37//! and its operation bodies.
38//! - A [`Servicer`] is the shared, type-erased service handle stored by
39//! operators and layers.
40//! - A [`Layer`] wraps the service stack, the operation context, or both.
41//!
42//! Continue with [implementing a service][accessor] or
43//! [implementing a layer][layer].
44//!
45//! [`Operator`]: crate::Operator
46//! [`Service`]: crate::raw::Service
47//! [`ServiceDyn`]: crate::raw::ServiceDyn
48//! [`Servicer`]: crate::raw::Servicer
49//! [`Layer`]: crate::raw::Layer
50
51pub mod accessor;
52pub mod layer;