1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0
 */

use super::{HttpMarker, ModelMarker, Plugin};

/// A [`Plugin`] that maps a service to itself.
#[derive(Debug)]
pub struct IdentityPlugin;

impl<Ser, Op, S> Plugin<Ser, Op, S> for IdentityPlugin {
    type Output = S;

    fn apply(&self, svc: S) -> S {
        svc
    }
}

impl ModelMarker for IdentityPlugin {}
impl HttpMarker for IdentityPlugin {}