pub struct LifecycleSynchronousProxy { /* private fields */ }
Implementations§
Source§impl LifecycleSynchronousProxy
impl LifecycleSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<LifecycleEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<LifecycleEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn start(
&self,
payload: &LifecycleStartRequest,
___deadline: MonotonicInstant,
) -> Result<LifecycleStartResult, Error>
pub fn start( &self, payload: &LifecycleStartRequest, ___deadline: MonotonicInstant, ) -> Result<LifecycleStartResult, Error>
Starts the session.
Returns after the session component has been created and started.
- error
LifecycleError.NOT_FOUND
ifsession_url
has not been provided and there is no configured default session URL. - error
LifecycleError.ALREADY_STARTED
if a session has already been started. - error
LifecycleError.RESOLVE_COMPONENT_FAILED
ifsession_url
could not be resolved to a component. - error
LifecycleError.DESTROY_COMPONENT_FAILED
if an existing session component could not be destroyed. The existing session remains running at this point. - error
LifecycleError.CREATE_COMPONENT_FAILED
if the session component could not be started. No session will be running at this point.
Sourcepub fn stop(
&self,
___deadline: MonotonicInstant,
) -> Result<LifecycleStopResult, Error>
pub fn stop( &self, ___deadline: MonotonicInstant, ) -> Result<LifecycleStopResult, Error>
Stops the session.
Returns after the session component has been destroyed.
- error
LifecycleError.NOT_FOUND
if the session has not been started. - error
LifecycleError.DESTROY_COMPONENT_FAILED
if the session component could not be destroyed. The previous session will continue to exist at this point and the component may be running.
Sourcepub fn restart(
&self,
___deadline: MonotonicInstant,
) -> Result<LifecycleRestartResult, Error>
pub fn restart( &self, ___deadline: MonotonicInstant, ) -> Result<LifecycleRestartResult, Error>
Restarts the session.
This stops the existing session and starts a new session with the same session URL as the previous one.
Returns once the new session component has been created and started.
- error
LifecycleError.NOT_FOUND
if there is no existing session. - error
LifecycleError.RESOLVE_COMPONENT_FAILED
if the session URL could not be resolved to a component. - error
LifecycleError.DESTROY_COMPONENT_FAILED
if the session component could not be destroyed. The previous session will continue to exist at this point and the component may be running. - error
LifecycleError.CREATE_COMPONENT_FAILED
if the session component could not be started. No session will be running at this point.
Trait Implementations§
Source§impl Debug for LifecycleSynchronousProxy
impl Debug for LifecycleSynchronousProxy
Source§impl SynchronousProxy for LifecycleSynchronousProxy
impl SynchronousProxy for LifecycleSynchronousProxy
Source§type Proxy = LifecycleProxy
type Proxy = LifecycleProxy
The async proxy for the same protocol.
Source§type Protocol = LifecycleMarker
type Protocol = LifecycleMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for LifecycleSynchronousProxy
impl RefUnwindSafe for LifecycleSynchronousProxy
impl Send for LifecycleSynchronousProxy
impl Sync for LifecycleSynchronousProxy
impl Unpin for LifecycleSynchronousProxy
impl UnwindSafe for LifecycleSynchronousProxy
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