Skip to main content

TCPDatapointValueSerialize

Struct TCPDatapointValueSerialize 

#[repr(transparent)]
pub struct TCPDatapointValueSerialize<'a>(&'a GCDatapointValue);

Tuple Fields§

§0: &'a GCDatapointValue

Methods from Deref<Target = GCDatapointValue>§

Source

pub fn get_value(&self) -> Result<GCDatapointValueType, GCPluginABIError>

Get the value of the current datapoint This method may add a slight overhead to the execution time, if the value is already known it is recommended to use the specific getter methods It returns an error if the value is not supported or unknown

Source

pub fn get_value_bool(&self) -> Option<bool>

Get the value of the current datapoint as a boolean Returns None if the value is not a boolean

Source

pub fn get_value_double_point(&self) -> Option<u8>

Get the value of the current datapoint as a double point Returns None if the value is not a double point

Source

pub fn get_value_i64(&self) -> Option<i64>

Get the value of the current datapoint as a 64 bit signed integer Returns None if the value is not a 64 bit signed integer

Source

pub fn get_value_i32(&self) -> Option<i32>

Get the value of the current datapoint as a 32 bit signed integer Returns None if the value is not a 32 bit signed integer

Source

pub fn get_value_u32(&self) -> Option<u32>

Get the value of the current datapoint as a 32 bit unsigned integer Returns None if the value is not a 32 bit unsigned integer

Source

pub fn get_value_u64(&self) -> Option<u64>

Get the value of the current datapoint as a 64 bit unsigned integer Returns None if the value is not a 64 bit unsigned integer

Source

pub fn get_value_f64(&self) -> Option<f64>

Get the value of the current datapoint as a 64 bit floating point Returns None if the value is not a 64 bit floating point

Source

pub fn get_value_f32(&self) -> Option<f32>

Get the value of the current datapoint as a 32 bit floating point Returns None if the value is not a 32 bit floating point

Source

pub fn get_value_timestamp_ns(&self) -> Option<u64>

Get the value of the current datapoint as a timestamp in nanoseconds Returns None if the value is not a timestamp

Source

pub fn get_value_bytes(&self) -> Option<Vec<u8>>

Get the value of the current datapoint as a byte array Returns None if the value is not a byte array

Source

pub fn get_timestamp(&self) -> u64

Returns the timestamp of the datapoint value

Source

pub fn get_id(&self) -> u64

Returns the datapoint id of the datapoint value

Source

pub fn get_quality(&self) -> GCDatapointValueQuality

Returns the quality of the datapoint value

Source

pub fn as_raw(&self) -> sGCDatapointValue

Returns the raw representation of the datapoint value

Trait Implementations§

§

impl Deref for TCPDatapointValueSerialize<'_>

§

type Target = GCDatapointValue

The resulting type after dereferencing.
§

fn deref(&self) -> &Self::Target

Dereferences the value.
§

impl<'a> From<&'a GCDatapointValue> for TCPDatapointValueSerialize<'a>

§

fn from(value: &'a GCDatapointValue) -> Self

Converts to this type from the input type.
§

impl Packet for TCPDatapointValueSerialize<'_>

§

fn id() -> u8

Returns the unique packet ID for this type.
§

impl<'a> SerializeSized for TCPDatapointValueSerialize<'a>

§

fn serialization_len(&self) -> usize

Get the length required for serialization.
§

fn serialize(&self, buffer: &mut [u8]) -> Result<(), Error>

Serialize into the provided buffer. The buffer size will ALWAYS be exactly equal to serialization_len().

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> 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V