pub struct AppState {
pub link_service: Arc<dyn LinkService>,
pub config: Arc<LinksConfig>,
pub registry: Arc<LinkRouteRegistry>,
pub entity_fetchers: Arc<HashMap<String, Arc<dyn EntityFetcher>>>,
pub entity_creators: Arc<HashMap<String, Arc<dyn EntityCreator>>>,
}Expand description
Application state shared across handlers
Fields§
§link_service: Arc<dyn LinkService>§config: Arc<LinksConfig>§registry: Arc<LinkRouteRegistry>§entity_fetchers: Arc<HashMap<String, Arc<dyn EntityFetcher>>>Entity fetchers for enriching links with full entity data
entity_creators: Arc<HashMap<String, Arc<dyn EntityCreator>>>Entity creators for creating new entities with automatic linking
Implementations§
Source§impl AppState
impl AppState
Sourcepub fn get_link_auth_policy(
link_definition: &LinkDefinition,
operation: &str,
) -> Option<String>
pub fn get_link_auth_policy( link_definition: &LinkDefinition, operation: &str, ) -> Option<String>
Get the authorization policy for a link operation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl !UnwindSafe for AppState
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