pub struct SubDefinition {
pub sub_index: u8,
pub parameter_name: String,
pub field_name: Option<String>,
pub data_type: DataType,
pub access_type: AccessTypeDeser,
pub default_value: Option<DefaultValue>,
pub pdo_mapping: PdoMappable,
pub persist: bool,
}Available on crate feature
std only.Expand description
Defines a sub-object in a record
Fields§
§sub_index: u8Sub index for the sub-object being defined
parameter_name: StringA human readable name for the value stored in this sub-object
field_name: Option<String>Used to name the struct field associated with this sub object
This is only applicable to record objects. If no name is provided, the default field name
will be sub[index], where index is the uppercase hex representation of the sub index
data_type: DataTypeThe data type of the sub object
access_type: AccessTypeDeserAccess permissions for the sub object
default_value: Option<DefaultValue>The default value for the sub object
pdo_mapping: PdoMappableIndicates whether this sub object can be mapped to PDOs
persist: boolIndicates if this sub object should be saved when the save command is sent
Trait Implementations§
Source§impl Clone for SubDefinition
impl Clone for SubDefinition
Source§fn clone(&self) -> SubDefinition
fn clone(&self) -> SubDefinition
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 Debug for SubDefinition
impl Debug for SubDefinition
Source§impl Default for SubDefinition
impl Default for SubDefinition
Source§fn default() -> SubDefinition
fn default() -> SubDefinition
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SubDefinition
impl<'de> Deserialize<'de> for SubDefinition
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
Auto Trait Implementations§
impl Freeze for SubDefinition
impl RefUnwindSafe for SubDefinition
impl Send for SubDefinition
impl Sync for SubDefinition
impl Unpin for SubDefinition
impl UnwindSafe for SubDefinition
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