pub struct DeprecationMiddleware { /* private fields */ }Expand description
Version deprecation middleware
Implementations§
Source§impl DeprecationMiddleware
impl DeprecationMiddleware
pub fn new(deprecated_versions: Vec<ApiVersion>) -> Self
pub fn with_sunset_date(self, date: String) -> Self
Sourcepub fn add_headers(&self, version: ApiVersion, response: &mut OxiditeResponse)
pub fn add_headers(&self, version: ApiVersion, response: &mut OxiditeResponse)
Add deprecation headers to response
Auto Trait Implementations§
impl Freeze for DeprecationMiddleware
impl RefUnwindSafe for DeprecationMiddleware
impl Send for DeprecationMiddleware
impl Sync for DeprecationMiddleware
impl Unpin for DeprecationMiddleware
impl UnsafeUnpin for DeprecationMiddleware
impl UnwindSafe for DeprecationMiddleware
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more