pub struct ManagerSynchronousProxy { /* private fields */ }
Implementations§
source§impl ManagerSynchronousProxy
impl ManagerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<ManagerEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<ManagerEvent, 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 propose_element(
&self,
spec: Spec,
controller: Option<ServerEnd<ControllerMarker>>,
___deadline: Time
) -> Result<ManagerProposeElementResult, Error>
pub fn propose_element( &self, spec: Spec, controller: Option<ServerEnd<ControllerMarker>>, ___deadline: Time ) -> Result<ManagerProposeElementResult, Error>
Proposes to add an element to the session.
If ProposeElement
returns without error, the caller can assume
the element is now part of the session. However, whether or not the
element component is actively running, or not, depends on the session
implementation. For example, a session may decide to conserve resources by
suspending an element which is not visible, or delay the running of an
element until a more appropriate time.
Spec
spec.component_url
is required
spec
describes the element to addcontroller
can be used to observe and affect the lifecycle of the element, and to set and get annotations on the element
- error
ProposeElementError.NOT_FOUND
ifspec.component_url
could not be resolved - error
ProposeElementError.INVALID_ARGS
if a required field is not present or annotations are invalid