pub struct Service<P> where
P: Platform, { /* private fields */ }
Implementations
sourceimpl<P: Platform> Service<P>
impl<P: Platform> Service<P>
pub fn new(platform: P) -> Self
sourcepub fn try_new_client<S: Syscall>(
&mut self,
client_id: &str,
syscall: S
) -> Result<ClientImplementation<S>, ()>
pub fn try_new_client<S: Syscall>(
&mut self,
client_id: &str,
syscall: S
) -> Result<ClientImplementation<S>, ()>
Add a new client, claiming one of the statically configured interchange pairs.
sourcepub fn try_as_new_client(
&mut self,
client_id: &str
) -> Result<ClientImplementation<&mut Service<P>>, ()>
pub fn try_as_new_client(
&mut self,
client_id: &str
) -> Result<ClientImplementation<&mut Service<P>>, ()>
Specialization of try_new_client
, using self
’s implementation of Syscall
(directly call self for processing). This method is only useful for single-threaded
single-app runners.
pub fn add_endpoint(
&mut self,
interchange: Responder<TrussedInterchange>,
client_id: ClientId
) -> Result<(), ServiceEndpoint>
pub fn set_seed_if_uninitialized(&mut self, seed: &[u8; 32])
pub fn update_ui(&mut self)
pub fn process(&mut self)
Trait Implementations
Auto Trait Implementations
impl<P> RefUnwindSafe for Service<P> where
P: RefUnwindSafe,
impl<P> Sync for Service<P> where
P: Sync,
impl<P> Unpin for Service<P> where
P: Unpin,
impl<P> !UnwindSafe for Service<P>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more