pub enum FcsDataType {
I,
F,
D,
A,
}Expand description
The data type of the FCS file, which determines how event data is stored
FCS files can store data in different numeric formats. The most common is single-precision floating point (F), which is also the default.
Variants§
I
Unsigned binary integer
F
Single-precision floating point (f32)
D
Double-precision floating point (f64)
A
ASCII-encoded string (not supported)
Implementations§
Source§impl FcsDataType
impl FcsDataType
Sourcepub fn from_keyword_str(data_type: &str) -> Result<Self>
pub fn from_keyword_str(data_type: &str) -> Result<Self>
Matches the string pattern and returns the corresponding data type
§Errors
Will return Err if data_type is not a valid data type (ASCII-encoded strings are not supported, but binary integers, single-precision floating point, and double-precision floating point are supported)
Sourcepub fn to_keyword_str(&self) -> &str
pub fn to_keyword_str(&self) -> &str
Convert to the keyword string representation of the data type
§Returns
The single letter as expected by FCS file format (I, F, D, A)
Sourcepub fn get_bytes_for_bits(&self, bits: usize) -> usize
pub fn get_bytes_for_bits(&self, bits: usize) -> usize
Returns the number of bytes for the data type based on the number of bits
This is used in conjunction with $PnB to determine the actual bytes per parameter.
For I (integer) type, the actual bytes depend on $PnB (e.g., 16 bits = 2 bytes, 32 bits = 4 bytes).
For F (float32), always 4 bytes.
For D (float64), always 8 bytes.
§Arguments
bits- Number of bits from$PnBkeyword
§Returns
Number of bytes for this data type with the given bit width
Trait Implementations§
Source§impl Clone for FcsDataType
impl Clone for FcsDataType
Source§fn clone(&self) -> FcsDataType
fn clone(&self) -> FcsDataType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FcsDataType
impl Debug for FcsDataType
Source§impl Default for FcsDataType
impl Default for FcsDataType
Source§fn default() -> FcsDataType
fn default() -> FcsDataType
Source§impl<'de> Deserialize<'de> for FcsDataType
impl<'de> Deserialize<'de> for FcsDataType
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>,
Source§impl Display for FcsDataType
impl Display for FcsDataType
Source§impl Hash for FcsDataType
impl Hash for FcsDataType
Source§impl PartialEq for FcsDataType
impl PartialEq for FcsDataType
Source§impl Serialize for FcsDataType
impl Serialize for FcsDataType
impl Copy for FcsDataType
impl Eq for FcsDataType
impl StructuralPartialEq for FcsDataType
Auto Trait Implementations§
impl Freeze for FcsDataType
impl RefUnwindSafe for FcsDataType
impl Send for FcsDataType
impl Sync for FcsDataType
impl Unpin for FcsDataType
impl UnsafeUnpin for FcsDataType
impl UnwindSafe for FcsDataType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.