pub struct InMemoryRoutingStore { /* private fields */ }Expand description
Test / dev backend. Holds a HashMap<org_id, Vec
Implementations§
Trait Implementations§
Source§impl Debug for InMemoryRoutingStore
impl Debug for InMemoryRoutingStore
Source§impl Default for InMemoryRoutingStore
impl Default for InMemoryRoutingStore
Source§fn default() -> InMemoryRoutingStore
fn default() -> InMemoryRoutingStore
Returns the “default value” for a type. Read more
Source§impl RoutingStore for InMemoryRoutingStore
impl RoutingStore for InMemoryRoutingStore
Source§fn list_for_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Route>, RoutingStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_for_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Route>, RoutingStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch the enabled-and-current route list for
org_id. Returns
Ok(vec![]) when the org has no routes — not an error.Source§fn list_all_for_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Route>, RoutingStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_all_for_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Route>, RoutingStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Management: ALL of an org’s routes, including disabled ones.
Source§fn create_route<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
spec: NewRoute,
) -> Pin<Box<dyn Future<Output = Result<Route, RoutingStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_route<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
spec: NewRoute,
) -> Pin<Box<dyn Future<Output = Result<Route, RoutingStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Management: create a route for
org_id. Returns the created route.Source§fn get_route<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Route>, RoutingStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_route<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Route>, RoutingStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Management: fetch one route owned by
org_id.Source§fn delete_route<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, RoutingStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_route<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, RoutingStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Management: delete one route owned by
org_id. Returns whether a row was removed.Auto Trait Implementations§
impl !Freeze for InMemoryRoutingStore
impl RefUnwindSafe for InMemoryRoutingStore
impl Send for InMemoryRoutingStore
impl Sync for InMemoryRoutingStore
impl Unpin for InMemoryRoutingStore
impl UnsafeUnpin for InMemoryRoutingStore
impl UnwindSafe for InMemoryRoutingStore
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