pub struct Local<'t> { /* private fields */ }Expand description
Represents a local group’s settings.
Implementations§
Source§impl Local<'_>
impl Local<'_>
Sourcepub fn entrypoint(self) -> Self
pub fn entrypoint(self) -> Self
Mark this group as an entrypoint.
It means, that this group will be started automatically when the system starts, with empty configuration is provided.
Usually, only system.configurers group is marked as an entrypoint.
Sourcepub fn route_to<F>(&self, dest: &impl Destination<F>, filter: F)
pub fn route_to<F>(&self, dest: &impl Destination<F>, filter: F)
Defines a route to the given destination (local or remote group).
§Examples
Local to local:
use elfo::{Topology, msg};
let topology = Topology::empty();
let foo = topology.local("foo");
let bar = topology.local("bar");
foo.route_to(&bar, |envelope| {
msg!(match envelope {
SomeEvent => true,
_ => false,
})
});Local to remote (requires the network feature): TODO
pub fn route_all_to(&self, dest: &Local<'_>)
Trait Implementations§
Auto Trait Implementations§
impl<'t> !Freeze for Local<'t>
impl<'t> !RefUnwindSafe for Local<'t>
impl<'t> Send for Local<'t>
impl<'t> !Sync for Local<'t>
impl<'t> Unpin for Local<'t>
impl<'t> UnsafeUnpin for Local<'t>
impl<'t> !UnwindSafe for Local<'t>
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