pub struct CorticalID { /* private fields */ }Implementations§
Source§impl CorticalID
impl CorticalID
pub const CORTICAL_ID_LENGTH: usize = 8
pub const CORTICAL_ID_LENGTH_BASE_64: usize
pub const NUMBER_OF_BYTES: usize = Self::CORTICAL_ID_LENGTH
pub fn try_from_bytes(bytes: &[u8; 8]) -> Result<CorticalID, FeagiDataError>
pub fn try_from_u64(u: u64) -> Result<CorticalID, FeagiDataError>
pub fn try_from_base_64(str: &str) -> Result<CorticalID, FeagiDataError>
pub fn write_id_to_bytes(&self, bytes: &mut [u8; 8])
Sourcepub fn extract_io_data_flag(
&self,
) -> Result<IOCorticalAreaConfigurationFlag, FeagiDataError>
pub fn extract_io_data_flag( &self, ) -> Result<IOCorticalAreaConfigurationFlag, FeagiDataError>
Extract IO data type configuration from cortical ID bytes
Extracts the data type configuration flag from bytes 4-5 (u16, little-endian) and converts it to an IOCorticalAreaDataFlag.
This is used internally for both BrainInput and BrainOutput cortical areas. Extract IO configuration flag from this cortical ID (bytes 4-5).
This exposes the authoritative FDP encoding metadata (variant, frame handling,
and optional percentage positioning) as IOCorticalAreaConfigurationFlag.
pub fn as_cortical_type(&self) -> Result<CorticalAreaType, FeagiDataError>
pub fn as_bytes(&self) -> &[u8; 8]
pub fn as_u64(&self) -> u64
pub fn as_base_64(&self) -> String
Sourcepub fn extract_subtype(&self) -> Option<String>
pub fn extract_subtype(&self) -> Option<String>
Extract subtype from cortical ID (e.g., “isvi0___” → “svi”) Returns None for CORE areas or if bytes are invalid UTF-8
Sourcepub fn extract_unit_id(&self) -> Option<u8>
pub fn extract_unit_id(&self) -> Option<u8>
Extract unit ID from cortical ID (typically byte 4) Returns None for CORE/CUSTOM/MEMORY areas
Sourcepub fn extract_group_id(&self) -> Option<u8>
pub fn extract_group_id(&self) -> Option<u8>
Extract group ID from cortical ID (similar to unit ID, but may be in different byte) For now, returns the same as unit_id
Trait Implementations§
Source§impl Clone for CorticalID
impl Clone for CorticalID
Source§fn clone(&self) -> CorticalID
fn clone(&self) -> CorticalID
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CorticalID
impl Debug for CorticalID
Source§impl<'de> Deserialize<'de> for CorticalID
impl<'de> Deserialize<'de> for CorticalID
Source§fn deserialize<D>(
deserializer: D,
) -> Result<CorticalID, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<CorticalID, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Display for CorticalID
impl Display for CorticalID
Source§impl Hash for CorticalID
impl Hash for CorticalID
Source§impl PartialEq for CorticalID
impl PartialEq for CorticalID
Source§impl Serialize for CorticalID
impl Serialize for CorticalID
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl Copy for CorticalID
impl Eq for CorticalID
impl StructuralPartialEq for CorticalID
Auto Trait Implementations§
impl Freeze for CorticalID
impl RefUnwindSafe for CorticalID
impl Send for CorticalID
impl Sync for CorticalID
impl Unpin for CorticalID
impl UnwindSafe for CorticalID
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> 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 more