Trait dfhack_proto::ProtocolTrait
source · [−]pub trait ProtocolTrait<TError> {
fn request<TRequest: Message, TReply: Message>(
&mut self,
plugin: String,
name: String,
request: TRequest
) -> Result<TReply, TError>;
}Expand description
Ability to exchange protobuf messages with DFHack
Required Methods
Send a request to DFHack
Errors
The error type is defined by the protocol implementation
Arguments
plugin- Name of the plugin implementing the request. Example: “RemoteFortressReader”. Empty for core messages.name- Name of the method. Example: “GetDFVersion”request- Input of the method.
Returns
A protobuf result type.