Struct dfhack_remote::Core
source · [−]pub struct Core<E, TProtocol> where
TProtocol: ProtocolTrait<E>, {
pub protocol: Rc<RefCell<TProtocol>>,
pub name: String,
/* private fields */
}Expand description
RPC for the “” plugin.
Fields
protocol: Rc<RefCell<TProtocol>>Reference to the client to exchange messages.
name: StringName of the plugin. All the RPC are attached to this name.
Implementations
sourceimpl<E, TProtocol> Core<E, TProtocol> where
TProtocol: ProtocolTrait<E>,
impl<E, TProtocol> Core<E, TProtocol> where
TProtocol: ProtocolTrait<E>,
sourcepub fn new(protocol: Rc<RefCell<TProtocol>>) -> Core<E, TProtocol>
pub fn new(protocol: Rc<RefCell<TProtocol>>) -> Core<E, TProtocol>
Instanciate a new plugin instance
sourcepub fn get_version(&mut self) -> Result<String, E>
pub fn get_version(&mut self) -> Result<String, E>
Method GetVersion from the plugin ``
sourcepub fn get_df_version(&mut self) -> Result<String, E>
pub fn get_df_version(&mut self) -> Result<String, E>
Method GetDFVersion from the plugin ``
sourcepub fn get_world_info(&mut self) -> Result<GetWorldInfoOut, E>
pub fn get_world_info(&mut self) -> Result<GetWorldInfoOut, E>
Method GetWorldInfo from the plugin ``
sourcepub fn list_enums(&mut self) -> Result<ListEnumsOut, E>
pub fn list_enums(&mut self) -> Result<ListEnumsOut, E>
Method ListEnums from the plugin ``
sourcepub fn list_job_skills(&mut self) -> Result<ListJobSkillsOut, E>
pub fn list_job_skills(&mut self) -> Result<ListJobSkillsOut, E>
Method ListJobSkills from the plugin ``
sourcepub fn list_materials(
&mut self,
request: ListMaterialsIn
) -> Result<ListMaterialsOut, E>
pub fn list_materials(
&mut self,
request: ListMaterialsIn
) -> Result<ListMaterialsOut, E>
Method ListMaterials from the plugin ``
sourcepub fn list_units(&mut self, request: ListUnitsIn) -> Result<ListUnitsOut, E>
pub fn list_units(&mut self, request: ListUnitsIn) -> Result<ListUnitsOut, E>
Method ListUnits from the plugin ``
sourcepub fn list_squads(&mut self, request: ListSquadsIn) -> Result<ListSquadsOut, E>
pub fn list_squads(&mut self, request: ListSquadsIn) -> Result<ListSquadsOut, E>
Method ListSquads from the plugin ``
sourcepub fn set_unit_labors(&mut self, request: SetUnitLaborsIn) -> Result<(), E>
pub fn set_unit_labors(&mut self, request: SetUnitLaborsIn) -> Result<(), E>
Method SetUnitLabors from the plugin ``
sourcepub fn bind_method(
&mut self,
request: CoreBindRequest
) -> Result<CoreBindReply, E>
pub fn bind_method(
&mut self,
request: CoreBindRequest
) -> Result<CoreBindReply, E>
Method BindMethod from the plugin ``
sourcepub fn run_command(&mut self, request: CoreRunCommandRequest) -> Result<(), E>
pub fn run_command(&mut self, request: CoreRunCommandRequest) -> Result<(), E>
Method RunCommand from the plugin ``
sourcepub fn core_suspend(&mut self) -> Result<i32, E>
pub fn core_suspend(&mut self) -> Result<i32, E>
Method CoreSuspend from the plugin ``
sourcepub fn core_resume(&mut self) -> Result<i32, E>
pub fn core_resume(&mut self) -> Result<i32, E>
Method CoreResume from the plugin ``
sourcepub fn run_lua(
&mut self,
request: CoreRunLuaRequest
) -> Result<StringListMessage, E>
pub fn run_lua(
&mut self,
request: CoreRunLuaRequest
) -> Result<StringListMessage, E>
Method RunLua from the plugin ``
Auto Trait Implementations
impl<E, TProtocol> !RefUnwindSafe for Core<E, TProtocol>
impl<E, TProtocol> !Send for Core<E, TProtocol>
impl<E, TProtocol> !Sync for Core<E, TProtocol>
impl<E, TProtocol> Unpin for Core<E, TProtocol> where
E: Unpin,
impl<E, TProtocol> !UnwindSafe for Core<E, TProtocol>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more