pub struct LaneRegistry { /* private fields */ }Expand description
A registry that stores Lane trait objects for agent use.
Agents use a LaneRegistry instead of domain-specific vectors
(e.g., Vec<Box<dyn RenderLane>>). This enables developers to add
custom lanes without modifying agent code.
ⓘ
use khora_core::lane::{LaneRegistry, LaneKind};
let mut reg = LaneRegistry::new();
reg.register(Box::new(MyCustomLane::new()));
// Find all render lanes
let render_lanes = reg.find_by_kind(LaneKind::Render);Implementations§
Source§impl LaneRegistry
impl LaneRegistry
Sourcepub fn find_by_kind(&self, kind: LaneKind) -> Vec<&dyn Lane>
pub fn find_by_kind(&self, kind: LaneKind) -> Vec<&dyn Lane>
Returns all lanes of a given kind.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LaneRegistry
impl !RefUnwindSafe for LaneRegistry
impl Send for LaneRegistry
impl Sync for LaneRegistry
impl Unpin for LaneRegistry
impl !UnwindSafe for LaneRegistry
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