pub struct EnvironmentBuilder<T: StorageFactory<Storage = DeviceStorage>> { /* private fields */ }Expand description
The EnvironmentBuilder aggregates the parameters surrounding an environment and ultimately spawns an environment based on them.
Implementations§
Source§impl<T: StorageFactory<Storage = DeviceStorage> + 'static> EnvironmentBuilder<T>
impl<T: StorageFactory<Storage = DeviceStorage> + 'static> EnvironmentBuilder<T>
Sourcepub fn new(storage_factory: Rc<T>) -> Self
pub fn new(storage_factory: Rc<T>) -> Self
Construct a new EnvironmentBuilder using storage_factory to construct the storage for
the future [Environment].
Sourcepub fn service(self, generate_service: GenerateService) -> Self
pub fn service(self, generate_service: GenerateService) -> Self
A service generator to be used as an overlay on the ServiceContext.
Sourcepub fn configuration(self, configuration: ServiceConfiguration) -> Self
pub fn configuration(self, configuration: ServiceConfiguration) -> Self
A preset configuration to load preset parameters as a base. Note that this will override any configuration modifications made by [EnvironmentBuilder::fidl_interface], [EnvironmentBuilder::policies], and EnvironmentBuilder::flags.
pub fn display_configuration( self, display_configuration: DefaultSetting<DisplayConfiguration, &'static str>, ) -> Self
pub fn audio_configuration( self, audio_configuration: DefaultSetting<AudioInfo, &'static str>, ) -> Self
pub fn input_configuration( self, input_configuration: DefaultSetting<InputConfiguration, &'static str>, ) -> Self
pub fn light_configuration( self, light_configuration: DefaultSetting<LightHardwareConfiguration, &'static str>, ) -> Self
Sourcepub fn fidl_interfaces(self, interfaces: &[Interface]) -> Self
pub fn fidl_interfaces(self, interfaces: &[Interface]) -> Self
Will override all fidl interfaces in the ServiceConfiguration.
Sourcepub fn settings(self, settings: &[SettingType]) -> Self
pub fn settings(self, settings: &[SettingType]) -> Self
Setting types to participate.
Sourcepub fn flags(self, controller_flags: &[ControllerFlag]) -> Self
pub fn flags(self, controller_flags: &[ControllerFlag]) -> Self
Setting types to participate with customized controllers.
Sourcepub fn listener_inspect_logger(
self,
active_listener_inspect_logger: Rc<ListenerInspectLogger>,
) -> Self
pub fn listener_inspect_logger( self, active_listener_inspect_logger: Rc<ListenerInspectLogger>, ) -> Self
Sets the inspect node for setting proxy inspect information and any required inspect loggers.
pub fn storage_dir(self, storage_dir: DirectoryProxy) -> Self
pub fn store_proxy(self, store_proxy: StoreProxy) -> Self
pub fn fidl_storage_factory( self, fidl_storage_factory: Rc<FidlStorageFactory>, ) -> Self
Sourcepub fn spawn(
self,
executor: LocalExecutor,
fs: ServiceFs<ServiceObjLocal<'_, ()>>,
) -> Result<(), Error>
pub fn spawn( self, executor: LocalExecutor, fs: ServiceFs<ServiceObjLocal<'_, ()>>, ) -> Result<(), Error>
Spawn an [Environment] on the supplied fasync::LocalExecutor so that it may process incoming FIDL requests.
Auto Trait Implementations§
impl<T> Freeze for EnvironmentBuilder<T>
impl<T> !RefUnwindSafe for EnvironmentBuilder<T>
impl<T> !Send for EnvironmentBuilder<T>
impl<T> !Sync for EnvironmentBuilder<T>
impl<T> Unpin for EnvironmentBuilder<T>
impl<T> !UnwindSafe for EnvironmentBuilder<T>
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more