pub struct Classifier {
pub classifier_id: String,
pub name: String,
pub parent_region_id: String,
pub coordinates_3d: [i32; 3],
pub kernel_area_id: Option<String>,
pub class_area_id: Option<String>,
pub fields: Vec<ClassifierField>,
pub kernel_memory_id: String,
pub class_memory_id: String,
pub properties: HashMap<String, Value>,
}Expand description
First-class classifier record persisted in the genome.
Fields§
§classifier_id: StringUUID string, genome map key.
name: String§parent_region_id: StringRegion that contains this assembly. Classifiers are not regions.
coordinates_3d: [i32; 3]§kernel_area_id: Option<String>Referenced inputs. Cleared when that area is deleted.
class_area_id: Option<String>§fields: Vec<ClassifierField>Field scans. Empty until Classifier mappings are drawn.
kernel_memory_id: StringOwned internals. Deleting kernel or class memory deletes the classifier.
class_memory_id: String§properties: HashMap<String, Value>Implementations§
Source§impl Classifier
impl Classifier
Sourcepub fn assembly_core_ids(&self) -> Vec<String>
pub fn assembly_core_ids(&self) -> Vec<String>
Kernel memory and class memory. Deleting either deletes the assembly.
Sourcepub fn owned_area_ids(&self) -> Vec<String>
pub fn owned_area_ids(&self) -> Vec<String>
Owned internals deleted with the classifier, including every field twin.
Sourcepub fn input_area_ids(&self) -> Vec<String>
pub fn input_area_ids(&self) -> Vec<String>
Referenced input areas that may be cleared independently.
pub fn owns_assembly_core(&self, area_id: &str) -> bool
Sourcepub fn owns_area(&self, area_id: &str) -> bool
pub fn owns_area(&self, area_id: &str) -> bool
True when area_id is kernel memory, class memory, or one of the field twins.
pub fn field_for_twin(&self, twin_id: &str) -> Option<&ClassifierField>
pub fn binding_for_field(&self, field_area_id: &str) -> Option<&ClassifierField>
Sourcepub fn references_input(&self, area_id: &str) -> bool
pub fn references_input(&self, area_id: &str) -> bool
True when area_id is a referenced input of this classifier.
Sourcepub fn apply_assembly_update(
&mut self,
name: Option<String>,
coordinates_3d: Option<[i32; 3]>,
parent_region_id: Option<String>,
kernel_area_id: Option<String>,
class_area_id: Option<String>,
) -> Result<(), String>
pub fn apply_assembly_update( &mut self, name: Option<String>, coordinates_3d: Option<[i32; 3]>, parent_region_id: Option<String>, kernel_area_id: Option<String>, class_area_id: Option<String>, ) -> Result<(), String>
Apply classifier-level edit. Does not replace owned internals or field bindings.
Sourcepub fn apply_metadata_update(
&mut self,
name: Option<String>,
coordinates_3d: Option<[i32; 3]>,
) -> Result<(), String>
pub fn apply_metadata_update( &mut self, name: Option<String>, coordinates_3d: Option<[i32; 3]>, ) -> Result<(), String>
Apply classifier-level metadata. Does not change owned internals or input slots.
Sourcepub fn required_mappings(&self) -> Vec<ClassifierMapping>
pub fn required_mappings(&self) -> Vec<ClassifierMapping>
Mappings this classifier requires given its current inputs.
Sourcepub fn clear_input(&mut self, area_id: &str)
pub fn clear_input(&mut self, area_id: &str)
Drop an input reference when that area is deleted.
Sourcepub fn detach_field(&mut self, field_area_id: &str) -> Option<String>
pub fn detach_field(&mut self, field_area_id: &str) -> Option<String>
Remove one field binding. Returns the removed twin id.
Sourcepub fn detach_twin(&mut self, twin_id: &str) -> Option<String>
pub fn detach_twin(&mut self, twin_id: &str) -> Option<String>
Remove the binding whose twin is twin_id. Returns the field area id.
pub fn attach_field( &mut self, field_area_id: String, scan_twin_id: String, ) -> Result<(), String>
Trait Implementations§
Source§impl Clone for Classifier
impl Clone for Classifier
Source§impl Debug for Classifier
impl Debug for Classifier
Source§impl<'de> Deserialize<'de> for Classifier
impl<'de> Deserialize<'de> for Classifier
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 PartialEq for Classifier
impl PartialEq for Classifier
Source§impl Serialize for Classifier
impl Serialize for Classifier
impl StructuralPartialEq for Classifier
Auto Trait Implementations§
impl Freeze for Classifier
impl RefUnwindSafe for Classifier
impl Send for Classifier
impl Sync for Classifier
impl Unpin for Classifier
impl UnsafeUnpin for Classifier
impl UnwindSafe for Classifier
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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