#[non_exhaustive]
pub enum Pmt {
Show 17 variants
Ok,
InvalidValue,
Null,
String(String),
Bool(bool),
Usize(usize),
U32(u32),
U64(u64),
F32(f32),
F64(f64),
VecF32(Vec<f32>),
VecU64(Vec<u64>),
Blob(Vec<u8>),
VecPmt(Vec<Pmt>),
Finished,
MapStrPmt(HashMap<String, Pmt>),
Any(Box<dyn PmtAny>),
}
Expand description
PMT – Polymorphic Type
PMTs are used as input and output for the FutureSDR message passing interface. At the moment,
the Any
type is ignored for de-/serialization.
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Invalid value
Mainly used as the return type in message handlers, when the parameter is outside the
allowed range.
Null
Used, for example, as the input type, when the message handler is mainly about the return
type.
U32, 32-bit unsiged integer
U64, 64-bit unsigned integer
Finished
Runtime message, used to signal the handler that a connected block finished.
Any type
Wrap anything that implements Any
in a Pmt. Use
downcast_ref/mut()
to extract.
Create a Pmt
by parsing a string into a specific PmtKind
.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Deserialize this value from the given Serde deserializer.
Read more
Formats the value using the given formatter.
Read more
The associated error which can be returned from parsing.
Parses a string
s
to return a value of this type.
Read more
This method tests for self
and other
values to be equal, and is used
by ==
.
This method tests for !=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Converts to this type from a reference to the input type.
Instruments this type with the provided [
Span
], returning an
Instrumented
wrapper.
Read more
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String
.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.