Trait datatypes::ImportantFunctions

source ·
pub trait ImportantFunctions {
    type InputType;
    type ReturnType;

    // Required methods
    fn new(data: Self::InputType) -> Self;
    fn get_value(&self) -> Self::ReturnType;
}
Expand description

A trait implemented by types to provide a new and get_value function

Required Associated Types§

source

type InputType

The type needed to construct the type

source

type ReturnType

The type returned by get_value

Required Methods§

source

fn new(data: Self::InputType) -> Self

A function that constructs a new instance of the type

source

fn get_value(&self) -> Self::ReturnType

A function that returns the hold data

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ImportantFunctions for Angle

source§

impl ImportantFunctions for BitSet

source§

impl ImportantFunctions for Boolean

source§

impl ImportantFunctions for Byte

source§

impl ImportantFunctions for ByteArray

source§

impl ImportantFunctions for Double

source§

impl ImportantFunctions for Float

source§

impl ImportantFunctions for Identifier

source§

impl ImportantFunctions for Int

source§

impl ImportantFunctions for Long

source§

impl ImportantFunctions for Position

source§

impl ImportantFunctions for Short

source§

impl ImportantFunctions for String

source§

impl ImportantFunctions for UUID

source§

impl ImportantFunctions for UnsignedByte

source§

impl ImportantFunctions for UnsignedShort

source§

impl ImportantFunctions for VarInt

source§

impl ImportantFunctions for VarLong

source§

impl<T> ImportantFunctions for Array<T>
where T: DataReader + DataWriter + Clone,

§

type InputType = Vec<T>

§

type ReturnType = Vec<T>

source§

impl<T, S> ImportantFunctions for Enum<T, S>
where S: DataReader + GetU64, T: ImportantEnumTrait + Clone,