pub struct AdapterContract<'a> { /* private fields */ }Expand description
Reviewed protocol, session, routing, and coverage declarations for an adapter.
Fields are private so downstream code cannot assemble an unreviewed contract.
Existing adapters obtain Self::legacy through the default trait method.
ⓘ
use gaze_proxy::{AdapterContract, ProtocolContract};
let _ = AdapterContract { protocol: ProtocolContract::LegacySurfaces };Implementations§
Source§impl AdapterContract<'static>
impl AdapterContract<'static>
Source§impl<'a> AdapterContract<'a>
impl<'a> AdapterContract<'a>
pub const fn protocol(&self) -> ProtocolContract<'a>
Sourcepub const fn uses_legacy_session_auto_create(&self) -> bool
pub const fn uses_legacy_session_auto_create(&self) -> bool
Legacy adapters preserve the server’s pre-contract auto-create behavior.
pub const fn session_policy(&self) -> Option<SessionPolicy>
pub const fn route_policy(&self) -> RoutePolicy
pub const fn header_policy(&self) -> HeaderPolicy
pub const fn redirect_policy(&self) -> RedirectPolicy
pub const fn coverage_policy(&self) -> CoveragePolicy
pub const fn formats(&self) -> FormatPolicy
pub const fn codec_limits(&self) -> Option<CodecLimits>
Trait Implementations§
Source§impl<'a> Clone for AdapterContract<'a>
impl<'a> Clone for AdapterContract<'a>
impl<'a> Copy for AdapterContract<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for AdapterContract<'a>
impl<'a> !UnwindSafe for AdapterContract<'a>
impl<'a> Freeze for AdapterContract<'a>
impl<'a> Send for AdapterContract<'a>
impl<'a> Sync for AdapterContract<'a>
impl<'a> Unpin for AdapterContract<'a>
impl<'a> UnsafeUnpin for AdapterContract<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more