Struct dfhack_remote::Core

source ·
pub struct Core<'a, TChannel>
where TChannel: Channel,
{ pub channel: &'a mut TChannel, }
Expand description

RPC for the “” plugin.

Fields§

§channel: &'a mut TChannel

Reference to the client to exchange messages.

Implementations§

source§

impl<'a, TChannel> Core<'a, TChannel>
where TChannel: Channel,

source

pub fn new(channel: &'a mut TChannel) -> Core<'a, TChannel>

Initialize the plugin from a channel to DFHack.

source

pub fn bind_method( &mut self, request: CoreBindRequest ) -> Result<CoreBindReply, <TChannel as Channel>::TError>

Method BindMethod from the plugin ``

source

pub fn core_resume(&mut self) -> Result<i32, <TChannel as Channel>::TError>

Method CoreResume from the plugin ``

source

pub fn core_suspend(&mut self) -> Result<i32, <TChannel as Channel>::TError>

Method CoreSuspend from the plugin ``

source

pub fn get_df_version( &mut self ) -> Result<String, <TChannel as Channel>::TError>

Method GetDFVersion from the plugin ``

source

pub fn get_version(&mut self) -> Result<String, <TChannel as Channel>::TError>

Method GetVersion from the plugin ``

source

pub fn get_world_info( &mut self ) -> Result<GetWorldInfoOut, <TChannel as Channel>::TError>

Method GetWorldInfo from the plugin ``

source

pub fn list_enums( &mut self ) -> Result<ListEnumsOut, <TChannel as Channel>::TError>

Method ListEnums from the plugin ``

source

pub fn list_job_skills( &mut self ) -> Result<ListJobSkillsOut, <TChannel as Channel>::TError>

Method ListJobSkills from the plugin ``

source

pub fn list_materials( &mut self, request: ListMaterialsIn ) -> Result<ListMaterialsOut, <TChannel as Channel>::TError>

Method ListMaterials from the plugin ``

source

pub fn list_squads( &mut self, request: ListSquadsIn ) -> Result<ListSquadsOut, <TChannel as Channel>::TError>

Method ListSquads from the plugin ``

source

pub fn list_units( &mut self, request: ListUnitsIn ) -> Result<ListUnitsOut, <TChannel as Channel>::TError>

Method ListUnits from the plugin ``

source

pub fn run_command( &mut self, request: CoreRunCommandRequest ) -> Result<(), <TChannel as Channel>::TError>

Method RunCommand from the plugin ``

source

pub fn run_lua( &mut self, request: CoreRunLuaRequest ) -> Result<StringListMessage, <TChannel as Channel>::TError>

Method RunLua from the plugin ``

source

pub fn set_unit_labors( &mut self, request: SetUnitLaborsIn ) -> Result<(), <TChannel as Channel>::TError>

Method SetUnitLabors from the plugin ``

Auto Trait Implementations§

§

impl<'a, TChannel> Freeze for Core<'a, TChannel>

§

impl<'a, TChannel> RefUnwindSafe for Core<'a, TChannel>
where TChannel: RefUnwindSafe,

§

impl<'a, TChannel> Send for Core<'a, TChannel>
where TChannel: Send,

§

impl<'a, TChannel> Sync for Core<'a, TChannel>
where TChannel: Sync,

§

impl<'a, TChannel> Unpin for Core<'a, TChannel>

§

impl<'a, TChannel> !UnwindSafe for Core<'a, TChannel>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.