Hermit

Trait Hermit 

pub trait Hermit: Sized {
    // Required methods
    async fn identity_v1(self, context: Context) -> Identity;
    async fn version_v1(self, context: Context) -> Version;
    async fn status_v1(self, context: Context) -> StatusV1;
    async fn reload_v1(self, context: Context);
    async fn shutdown_v1(self, context: Context);
    async fn set_digital_output_v1(
        self,
        context: Context,
        pin: DigitalOutput,
        high: bool,
    );
    async fn confirm_external_time_sync_v1(self, context: Context);
    async fn debug_force_online_state_v1(self, context: Context, online: bool);
    async fn reset_nxp_v1(self, context: Context);
    async fn handshake_nxp_v1(self, context: Context);
    async fn status_v2(self, context: Context) -> Status;

    // Provided method
    fn serve(self) -> ServeHermit<Self> { ... }
}
Expand description

Hermit daemon interface.

Required Methods§

async fn identity_v1(self, context: Context) -> Identity

Returns the identity of the TCU.

async fn version_v1(self, context: Context) -> Version

Returns the version of the TCU.

async fn status_v1(self, context: Context) -> StatusV1

👎Deprecated since 1.1.0

Returns the status of the TCU.

async fn reload_v1(self, context: Context)

Reloads Hermit configuration.

async fn shutdown_v1(self, context: Context)

async fn set_digital_output_v1( self, context: Context, pin: DigitalOutput, high: bool, )

Sets a digital output to high or low.

async fn confirm_external_time_sync_v1(self, context: Context)

Confirms to the time manager that the time has been synced externally.

async fn debug_force_online_state_v1(self, context: Context, online: bool)

Forces the network manager to assume the given online state.

async fn reset_nxp_v1(self, context: Context)

Performs a soft reset of the NXP.

async fn handshake_nxp_v1(self, context: Context)

Performs a handshake with the NXP, over UART.

async fn status_v2(self, context: Context) -> Status

Returns the status of the TCU.

Provided Methods§

fn serve(self) -> ServeHermit<Self>

Returns a serving function to use with InFlightRequest::execute.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§