Struct SupMCUModuleDefinition

Source
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

Source

pub async fn name(&self, ctx: &Context<'_>) -> Result<&String>

Source

pub async fn address(&self, ctx: &Context<'_>) -> Result<&u16>

Source

pub async fn simulatable(&self, ctx: &Context<'_>) -> Result<&bool>

Source

pub async fn telemetry( &self, ctx: &Context<'_>, ) -> Result<&Vec<SupMCUTelemetryDefinition>>

Source

pub async fn commands(&self, ctx: &Context<'_>) -> Result<&Vec<SupMCUCommand>>

Source

pub async fn mcu(&self, ctx: &Context<'_>) -> Result<&McuType>

Source

pub async fn response_delay(&self, ctx: &Context<'_>) -> Result<&f32>

Source§

impl SupMCUModuleDefinition

Trait Implementations§

Source§

impl Clone for SupMCUModuleDefinition

Source§

fn clone(&self) -> SupMCUModuleDefinition

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

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,

Resolves a field value and outputs it as a json value async_graphql::Value. Read more
Source§

fn collect_all_fields<'a>( &'a self, ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>, fields: &mut Fields<'a>, ) -> Result<(), ServerError>
where Self: Send + Sync,

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,

Find the GraphQL entity with the given name from the parameter. Read more
Source§

impl Debug for SupMCUModuleDefinition

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SupMCUModuleDefinition

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SupMCUModuleDefinition

Source§

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl OutputType for SupMCUModuleDefinition

Source§

fn type_name() -> Cow<'static, str>

Type the name.
Source§

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,

Resolve an output value to async_graphql::Value.
Source§

fn qualified_type_name() -> String

Qualified typename.
Source§

fn introspection_type_name(&self) -> Cow<'static, str>

Introspection type name Read more
Source§

impl PartialEq for SupMCUModuleDefinition

Source§

fn eq(&self, other: &SupMCUModuleDefinition) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SupMCUModuleDefinition

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl ObjectType for SupMCUModuleDefinition

Source§

impl StructuralPartialEq for SupMCUModuleDefinition

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

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>,

Source§

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,