pub struct SupMCUModuleDefinition {
pub name: String,
pub address: u16,
pub simulatable: bool,
pub telemetry: Vec<SupMCUTelemetryDefinition>,
pub commands: Vec<SupMCUCommand>,
pub mcu: McuType,
pub response_delay: f32,
}
Fields§
§name: String
This is the prefix to every SCPI MODULE command (e.g. {cmd_name}:TEL? 15
)
address: u16
§simulatable: bool
§telemetry: Vec<SupMCUTelemetryDefinition>
§commands: Vec<SupMCUCommand>
§mcu: McuType
§response_delay: f32
Implementations§
Source§impl SupMCUModuleDefinition
impl SupMCUModuleDefinition
pub async fn name(&self, ctx: &Context<'_>) -> Result<&String>
pub async fn address(&self, ctx: &Context<'_>) -> Result<&u16>
pub async fn simulatable(&self, ctx: &Context<'_>) -> Result<&bool>
pub async fn telemetry( &self, ctx: &Context<'_>, ) -> Result<&Vec<SupMCUTelemetryDefinition>>
pub async fn commands(&self, ctx: &Context<'_>) -> Result<&Vec<SupMCUCommand>>
pub async fn mcu(&self, ctx: &Context<'_>) -> Result<&McuType>
pub async fn response_delay(&self, ctx: &Context<'_>) -> Result<&f32>
Source§impl SupMCUModuleDefinition
impl SupMCUModuleDefinition
pub fn get_supmcu_telemetry(&self) -> Vec<SupMCUTelemetryDefinition>
pub fn get_module_telemetry(&self) -> Vec<SupMCUTelemetryDefinition>
Trait Implementations§
Source§impl Clone for SupMCUModuleDefinition
impl Clone for SupMCUModuleDefinition
Source§fn clone(&self) -> SupMCUModuleDefinition
fn clone(&self) -> SupMCUModuleDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl ContainerType for SupMCUModuleDefinition
impl ContainerType for SupMCUModuleDefinition
Source§fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'life2>,
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'life2>,
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resolves a field value and outputs it as a json value
async_graphql::Value
. Read moreSource§fn collect_all_fields<'a>(
&'a self,
ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>,
fields: &mut Fields<'a>,
) -> Result<(), ServerError>
fn collect_all_fields<'a>( &'a self, ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>, fields: &mut Fields<'a>, ) -> Result<(), ServerError>
Collect all the fields of the container that are queried in the
selection set. Read more
Source§fn find_entity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_: &'life1 ContextBase<'life2, &'life2 Positioned<Field>>,
_params: &'life3 ConstValue,
) -> Pin<Box<dyn Future<Output = Result<Option<ConstValue>, ServerError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: Sync + 'async_trait,
fn find_entity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_: &'life1 ContextBase<'life2, &'life2 Positioned<Field>>,
_params: &'life3 ConstValue,
) -> Pin<Box<dyn Future<Output = Result<Option<ConstValue>, ServerError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: Sync + 'async_trait,
Find the GraphQL entity with the given name from the parameter. Read more
Source§impl Debug for SupMCUModuleDefinition
impl Debug for SupMCUModuleDefinition
Source§impl Default for SupMCUModuleDefinition
impl Default for SupMCUModuleDefinition
Source§impl<'de> Deserialize<'de> for SupMCUModuleDefinition
impl<'de> Deserialize<'de> for SupMCUModuleDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SupMCUModuleDefinition
impl Display for SupMCUModuleDefinition
Source§impl OutputType for SupMCUModuleDefinition
impl OutputType for SupMCUModuleDefinition
Source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
Source§fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ContextSelectionSet<'life2>,
_field: &'life3 Positioned<Field>,
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ContextSelectionSet<'life2>,
_field: &'life3 Positioned<Field>,
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Resolve an output value to
async_graphql::Value
.Source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
Source§impl PartialEq for SupMCUModuleDefinition
impl PartialEq for SupMCUModuleDefinition
Source§impl Serialize for SupMCUModuleDefinition
impl Serialize for SupMCUModuleDefinition
impl ObjectType for SupMCUModuleDefinition
impl StructuralPartialEq for SupMCUModuleDefinition
Auto Trait Implementations§
impl Freeze for SupMCUModuleDefinition
impl RefUnwindSafe for SupMCUModuleDefinition
impl Send for SupMCUModuleDefinition
impl Sync for SupMCUModuleDefinition
impl Unpin for SupMCUModuleDefinition
impl UnwindSafe for SupMCUModuleDefinition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more