Enum kerbalobjects::KOSType
source · #[repr(u8)]pub enum KOSType {
Show 13 variants
Null,
Bool,
Byte,
Int16,
Int32,
Float,
Double,
String,
ArgMarker,
ScalarInt,
ScalarDouble,
BoolValue,
StringValue,
}
Expand description
The type of an internal value within Kerbal Operating System.
See KOSValue for what these values look like.
This enum just describes the “type” of the KOSValue, which is stored as a single byte that prefixes the value (if there is one), which allows kOS to know how to interpret the following bytes.
Variants§
Null
A null value
Bool
A raw boolean
Byte
A single (signed) byte
Int16
A signed 16-bit integer
Int32
A signed 32-bit integer
Float
A 32-bit floating point number
Double
A 64-bit floating point number
String
A raw string
ArgMarker
An argument marker
ScalarInt
A signed 32-bit integer “value”
ScalarDouble
A 64-bit floating point number “value”
BoolValue
A boolean “value”
StringValue
A string “value”
Trait Implementations§
source§impl FromBytes for KOSType
impl FromBytes for KOSType
source§fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>where
Self: Sized,
fn from_bytes(source: &mut BufferIterator<'_>) -> Result<Self, Self::Error>where Self: Sized,
Parses a value from the buffer iterator.
source§impl PartialEq<KOSType> for KOSType
impl PartialEq<KOSType> for KOSType
source§impl ToBytes for KOSType
impl ToBytes for KOSType
source§fn to_bytes(&self, buf: &mut impl WritableBuffer)
fn to_bytes(&self, buf: &mut impl WritableBuffer)
Converts a type into bytes and appends it to the buffer.
impl Copy for KOSType
impl Eq for KOSType
impl StructuralEq for KOSType
impl StructuralPartialEq for KOSType
Auto Trait Implementations§
impl RefUnwindSafe for KOSType
impl Send for KOSType
impl Sync for KOSType
impl Unpin for KOSType
impl UnwindSafe for KOSType
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