pub struct StubService { /* private fields */ }Expand description
A generic stub service that returns 501 Not Implemented for all requests.
Used to register services that are recognized (routable) but not yet fully implemented. This ensures the router returns a proper “not implemented” error instead of “unknown service”.
Implementations§
Trait Implementations§
Source§impl MockService for StubService
impl MockService for StubService
Source§fn service_name(&self) -> &str
fn service_name(&self) -> &str
The service identifier (e.g., “sts”, “iam”, “s3”).
Source§fn url_patterns(&self) -> Vec<&str>
fn url_patterns(&self) -> Vec<&str>
URL patterns this service handles (as regex strings).
Source§fn handle(
&self,
_request: MockRequest,
) -> Pin<Box<dyn Future<Output = MockResponse> + Send + '_>>
fn handle( &self, _request: MockRequest, ) -> Pin<Box<dyn Future<Output = MockResponse> + Send + '_>>
Handle an incoming request and produce a response.
Auto Trait Implementations§
impl Freeze for StubService
impl RefUnwindSafe for StubService
impl Send for StubService
impl Sync for StubService
impl Unpin for StubService
impl UnsafeUnpin for StubService
impl UnwindSafe for StubService
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> 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 moreCreates a shared type from an unshared type.