Skip to main content

Classifier

Struct Classifier 

Source
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: String

UUID string, genome map key.

§name: String§parent_region_id: String

Region 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: String

Owned internals. Deleting kernel or class memory deletes the classifier.

§class_memory_id: String§properties: HashMap<String, Value>

Implementations§

Source§

impl Classifier

Source

pub fn assembly_core_ids(&self) -> Vec<String>

Kernel memory and class memory. Deleting either deletes the assembly.

Source

pub fn owned_area_ids(&self) -> Vec<String>

Owned internals deleted with the classifier, including every field twin.

Source

pub fn input_area_ids(&self) -> Vec<String>

Referenced input areas that may be cleared independently.

Source

pub fn owns_assembly_core(&self, area_id: &str) -> bool

Source

pub fn owns_area(&self, area_id: &str) -> bool

True when area_id is kernel memory, class memory, or one of the field twins.

Source

pub fn field_for_twin(&self, twin_id: &str) -> Option<&ClassifierField>

Source

pub fn binding_for_field(&self, field_area_id: &str) -> Option<&ClassifierField>

Source

pub fn references_input(&self, area_id: &str) -> bool

True when area_id is a referenced input of this classifier.

Source

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.

Source

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.

Source

pub fn required_mappings(&self) -> Vec<ClassifierMapping>

Mappings this classifier requires given its current inputs.

Source

pub fn clear_input(&mut self, area_id: &str)

Drop an input reference when that area is deleted.

Source

pub fn detach_field(&mut self, field_area_id: &str) -> Option<String>

Remove one field binding. Returns the removed twin id.

Source

pub fn detach_twin(&mut self, twin_id: &str) -> Option<String>

Remove the binding whose twin is twin_id. Returns the field area id.

Source

pub fn attach_field( &mut self, field_area_id: String, scan_twin_id: String, ) -> Result<(), String>

Source

pub fn apply_mapping_change( &mut self, src_area_id: &str, dst_area_id: &str, morphology_id: &str, removed: bool, ) -> bool

Bind or clear kernel/class inputs from a mapping change. Field scans are attached explicitly.

Trait Implementations§

Source§

impl Clone for Classifier

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Classifier

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Classifier

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Classifier

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Classifier

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Classifier

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.