pub struct DiscoveryService { /* private fields */ }Expand description
NestJS DiscoveryService analogue:
introspect registered providers and compiled HTTP routes.
Unlike Nest, there is no reflection over arbitrary class metadata: you get TypeId
keys, type names (strings), and whatever is in the global RouteRegistry.
Construct with Self::new(ModuleRef).
Docs: see the mdBook Fundamentals chapter in the nestrs repo (docs/src/fundamentals.md).
Implementations§
Source§impl DiscoveryService
impl DiscoveryService
pub fn new(module: ModuleRef) -> Self
pub fn module_ref(&self) -> ModuleRef
pub fn get_providers(&self) -> Vec<TypeId>
pub fn get_provider_type_names(&self) -> Vec<&'static str>
pub fn get_routes(&self) -> Vec<RouteInfo>
Auto Trait Implementations§
impl Freeze for DiscoveryService
impl !RefUnwindSafe for DiscoveryService
impl Send for DiscoveryService
impl Sync for DiscoveryService
impl Unpin for DiscoveryService
impl UnsafeUnpin for DiscoveryService
impl !UnwindSafe for DiscoveryService
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