pub struct StaticJsonEndpoint {
pub body: Vec<u8>,
pub content_type: &'static str,
}Expand description
Endpoint that serves a static JSON payload.
Used for built-in endpoints like /openapi.json and /health.
The content_type field allows RFC 8407 application/health+json
for health endpoints while defaulting to application/json.
Fields§
§body: Vec<u8>§content_type: &'static strImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StaticJsonEndpoint
impl RefUnwindSafe for StaticJsonEndpoint
impl Send for StaticJsonEndpoint
impl Sync for StaticJsonEndpoint
impl Unpin for StaticJsonEndpoint
impl UnsafeUnpin for StaticJsonEndpoint
impl UnwindSafe for StaticJsonEndpoint
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