pub struct Variable { /* private fields */ }

Implementations§

Constructs a new variable with the specified id, name, type and value

Sets the variable’s value

Sets the variable’s value directly but first test to see if it has changed. If the value has not changed the existing timestamps are preserved.

Sets a getter function that will be called to get the value of this variable.

Sets a setter function that will be called to set the value of this variable. Note you most likely want to set the corresponding getter too otherwise you will never get back the values you set otherwise.

Gets the minimum sampling interval, if the attribute was set

Sets the minimum sampling interval

Specifies in milliseconds how fast the server can reasonably sample the value for changes

The value 0 means server is to monitor the value continuously. The value -1 means indeterminate.

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Converts this type into the (usually inferred) input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.