pub struct GenomeServiceImpl { /* private fields */ }Expand description
Default implementation of GenomeService
Implementations§
Source§impl GenomeServiceImpl
impl GenomeServiceImpl
pub fn new(connectome: Arc<RwLock<ConnectomeManager>>) -> Self
pub fn new_with_parameter_queue( connectome: Arc<RwLock<ConnectomeManager>>, parameter_queue: ParameterUpdateQueue, ) -> Self
Sourcepub fn set_burst_runner(&mut self, burst_runner: Arc<RwLock<BurstLoopRunner>>)
pub fn set_burst_runner(&mut self, burst_runner: Arc<RwLock<BurstLoopRunner>>)
Set the burst runner for cache refresh
Sourcepub fn get_current_genome_arc(&self) -> Arc<RwLock<Option<RuntimeGenome>>>
pub fn get_current_genome_arc(&self) -> Arc<RwLock<Option<RuntimeGenome>>>
Get a reference to the current genome Arc This allows other services to share access to the genome for persistence
Trait Implementations§
Source§impl GenomeService for GenomeServiceImpl
impl GenomeService for GenomeServiceImpl
Source§fn load_genome<'life0, 'async_trait>(
&'life0 self,
params: LoadGenomeParams,
) -> Pin<Box<dyn Future<Output = ServiceResult<GenomeInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_genome<'life0, 'async_trait>(
&'life0 self,
params: LoadGenomeParams,
) -> Pin<Box<dyn Future<Output = ServiceResult<GenomeInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load a genome from JSON Read more
Source§fn save_genome<'life0, 'async_trait>(
&'life0 self,
params: SaveGenomeParams,
) -> Pin<Box<dyn Future<Output = ServiceResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_genome<'life0, 'async_trait>(
&'life0 self,
params: SaveGenomeParams,
) -> Pin<Box<dyn Future<Output = ServiceResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save the current connectome as a genome JSON Read more
Source§fn get_genome_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServiceResult<GenomeInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_genome_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServiceResult<GenomeInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get information about the currently loaded genome Read more
Source§fn validate_genome<'life0, 'async_trait>(
&'life0 self,
json_str: String,
) -> Pin<Box<dyn Future<Output = ServiceResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_genome<'life0, 'async_trait>(
&'life0 self,
json_str: String,
) -> Pin<Box<dyn Future<Output = ServiceResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Validate a genome JSON without loading it Read more
Source§fn reset_connectome<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reset_connectome<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reset the connectome (clear all cortical areas and brain regions) Read more
Source§fn create_cortical_areas<'life0, 'async_trait>(
&'life0 self,
params: Vec<CreateCorticalAreaParams>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<CorticalAreaInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_cortical_areas<'life0, 'async_trait>(
&'life0 self,
params: Vec<CreateCorticalAreaParams>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<CorticalAreaInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create new cortical areas and add them to the genome Read more
Source§fn update_cortical_area<'life0, 'life1, 'async_trait>(
&'life0 self,
cortical_id: &'life1 str,
changes: HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = ServiceResult<CorticalAreaInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_cortical_area<'life0, 'life1, 'async_trait>(
&'life0 self,
cortical_id: &'life1 str,
changes: HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = ServiceResult<CorticalAreaInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update a cortical area with intelligent routing for optimal performance Read more
Auto Trait Implementations§
impl Freeze for GenomeServiceImpl
impl !RefUnwindSafe for GenomeServiceImpl
impl Send for GenomeServiceImpl
impl Sync for GenomeServiceImpl
impl Unpin for GenomeServiceImpl
impl UnsafeUnpin for GenomeServiceImpl
impl !UnwindSafe for GenomeServiceImpl
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
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>
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 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>
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