pub struct Service<S, E: GearEnv = GstdEnv, R: RouteHeader = RouteIdx> { /* private fields */ }Implementations§
Source§impl<S, E: GearEnv, R: RouteHeader> Service<S, E, R>
impl<S, E: GearEnv, R: RouteHeader> Service<S, E, R>
pub fn new(env: E, actor_id: ActorId, route: R) -> Self
pub fn actor_id(&self) -> ActorId
pub fn with_actor_id(self, actor_id: ActorId) -> Self
pub fn pending_call<T: ServiceCall<Route = R>>( &self, args: T::Params, ) -> PendingCall<T, E>
pub fn base_service<B>(&self) -> Service<B, E, R>
pub fn decode_event<Ev: Event<R>>( &self, payload: impl AsRef<[u8]>, ) -> Result<Ev, Error>
pub async fn listen( &self, ) -> Result<impl Stream<Item = (ActorId, S::Event)> + Unpin + use<S, E, R>, <E as GearEnv>::Error>
Source§impl<S, E: GearEnv> Service<S, E, RouteIdx>
impl<S, E: GearEnv> Service<S, E, RouteIdx>
pub fn interface_id(&self) -> InterfaceIdwhere
S: Identifiable,
pub fn route_idx(&self) -> u8
Trait Implementations§
Auto Trait Implementations§
impl<S, E, R> Freeze for Service<S, E, R>
impl<S, E, R> RefUnwindSafe for Service<S, E, R>
impl<S, E, R> Send for Service<S, E, R>
impl<S, E, R> Sync for Service<S, E, R>
impl<S, E, R> Unpin for Service<S, E, R>
impl<S, E, R> UnsafeUnpin for Service<S, E, R>where
E: UnsafeUnpin,
R: UnsafeUnpin,
impl<S, E, R> UnwindSafe for Service<S, E, R>
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