pub enum RealmProxy_Request {
ConnectToNamedProtocol {
protocol: String,
server_end: Channel,
responder: RealmProxy_ConnectToNamedProtocolResponder,
},
OpenService {
service: String,
server_end: Channel,
responder: RealmProxy_OpenServiceResponder,
},
ConnectToServiceInstance {
service: String,
instance: String,
server_end: Channel,
responder: RealmProxy_ConnectToServiceInstanceResponder,
},
}
Expand description
This protocol mediates a test suite’s access to a component under test.
A RealmProxy is a test harness which allows some test suite to create instances of the component(s) under test on demand. Most importantly, the test suite does not have to know which components are created or how they are created; It is only required to know which capabilities the components expose.
For example, a generic test suite for Fuchsia filesystems can use the RealmProxy protocol to spawn components that serve protocols from the fuchsia.io FIDL library. The test suite doesn’t need to know which filesystem it’s testing or how the filesystem is initialized. It just needs to call [ConnectToNamedProtocol] with the name of a fuchsia.io protocol and start testing. By running this test suite with different proxies that initialize different filesystems, we can use the same suite to validate each system.
WARNING: RealmProxy will soon be deprecated. Prefer to return a fuchsia.component.sandbox.DictionaryRef and install that into your namespace.
Variants§
ConnectToNamedProtocol
Connects [server_end] to the [protocol] from this proxy’s namespace.
OpenService
Connects [server_end] to the [service] directory from this proxy’s namespace.
ConnectToServiceInstance
Connects [server_end] to the [service]/[instance] from this proxy’s namespace.
Implementations§
Source§impl RealmProxy_Request
impl RealmProxy_Request
pub fn into_connect_to_named_protocol( self, ) -> Option<(String, Channel, RealmProxy_ConnectToNamedProtocolResponder)>
pub fn into_open_service( self, ) -> Option<(String, Channel, RealmProxy_OpenServiceResponder)>
pub fn into_connect_to_service_instance( self, ) -> Option<(String, String, Channel, RealmProxy_ConnectToServiceInstanceResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL