Skip to main content

Model

Trait Model 

Source
pub trait Model:
    Send
    + Sync
    + 'static { }
Expand description

What a device model has to be, gathering in one bound everything a server needs of it: it is shared between the threads serving the requests, and it lives as long as the class it belongs to, which is as long as the server serving it.

Every such type is a model, there being nothing to implement: this is the bound the definitions and the devices are written against rather than a trait a model opts into.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Send + Sync + 'static> Model for T