pub enum FactoryRequest {
ConnectToSender {
capability: SenderCapability,
server_end: ServerEnd<SenderMarker>,
control_handle: FactoryControlHandle,
},
CreateSender {
receiver: ClientEnd<ReceiverMarker>,
responder: FactoryCreateSenderResponder,
},
CreateDictionary {
responder: FactoryCreateDictionaryResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: FactoryControlHandle,
method_type: MethodType,
},
}
Expand description
The [Factory
] protocol handles:
- Instantiation of sandbox types.
- Controlling sandbox objects given tokens.
Variants§
ConnectToSender
Operate on the provided sender capability.
Consumes a token referencing a bedrock object and serves the
corresponding FIDL representation on server_end
. The peer of the
server_end
is another reference to the bedrock object. Dropping the
control channel decreases one reference on the object.
Fields
§
capability: SenderCapability
§
server_end: ServerEnd<SenderMarker>
§
control_handle: FactoryControlHandle
CreateSender
Creates a Sender
from a client served Receiver
.
CreateDictionary
Creates a new empty [Dictionary
].
Fields
§
responder: FactoryCreateDictionaryResponder
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: FactoryControlHandle
§
method_type: MethodType
Implementations§
source§impl FactoryRequest
impl FactoryRequest
pub fn into_connect_to_sender( self ) -> Option<(SenderCapability, ServerEnd<SenderMarker>, FactoryControlHandle)>
pub fn into_create_sender( self ) -> Option<(ClientEnd<ReceiverMarker>, FactoryCreateSenderResponder)>
pub fn into_create_dictionary(self) -> Option<FactoryCreateDictionaryResponder>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FactoryRequest
impl !RefUnwindSafe for FactoryRequest
impl Send for FactoryRequest
impl Sync for FactoryRequest
impl Unpin for FactoryRequest
impl !UnwindSafe for FactoryRequest
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