pub struct RestExposure;Expand description
REST API exposure implementation
This struct encapsulates all REST-specific logic for exposing the API. It is completely separate from the framework core and can be replaced with other exposure types (GraphQL, gRPC, etc.).
Implementations§
Source§impl RestExposure
impl RestExposure
Sourcepub fn build_router(
host: Arc<ServerHost>,
custom_routes: Vec<Router>,
) -> Result<Router>
pub fn build_router( host: Arc<ServerHost>, custom_routes: Vec<Router>, ) -> Result<Router>
Build the REST router from a host
This method takes a ServerHost (which is transport-agnostic) and
builds an Axum router with all REST endpoints.
§Arguments
host- The server host containing all framework statecustom_routes- Additional custom routes to merge
§Returns
Returns a fully configured Axum router with:
- Health check routes
- Entity CRUD routes
- Link routes
- Custom routes
Auto Trait Implementations§
impl Freeze for RestExposure
impl RefUnwindSafe for RestExposure
impl Send for RestExposure
impl Sync for RestExposure
impl Unpin for RestExposure
impl UnwindSafe for RestExposure
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