Struct fuchsia_component::client::ServiceInstance
source · pub struct ServiceInstance<'a, S> {
pub name: String,
/* private fields */
}
Expand description
An instance of an aggregated fidl service that has been enumerated by [ServiceWatcher::watch
]
or [ServiceWatcher::watch_for_any
].
Fields§
§name: String
The name of the service instance within the service directory
Implementations§
source§impl<'a, P: ServiceProxy, S: ServiceMarker<Proxy = P>> ServiceInstance<'a, S>
impl<'a, P: ServiceProxy, S: ServiceMarker<Proxy = P>> ServiceInstance<'a, S>
sourcepub async fn connect(&self) -> Result<P, Error>
pub async fn connect(&self) -> Result<P, Error>
Connects to the instance named by Self::name
in the service directory that enumerated
it.
Auto Trait Implementations§
impl<'a, S> Freeze for ServiceInstance<'a, S>
impl<'a, S> !RefUnwindSafe for ServiceInstance<'a, S>
impl<'a, S> Send for ServiceInstance<'a, S>where
S: Sync,
impl<'a, S> Sync for ServiceInstance<'a, S>where
S: Sync,
impl<'a, S> Unpin for ServiceInstance<'a, S>
impl<'a, S> !UnwindSafe for ServiceInstance<'a, S>
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