pub enum SubnetCommand {
Show 14 variants
AllocateTask {
task_type: String,
transactions: Vec<WorkUnit>,
tx: Sender<Result<(), NetworkError>>,
},
Connect {
address: Multiaddr,
tx: Sender<Result<NodeId, NetworkError>>,
},
DistributeSurfacePatterns {
tx: Sender<Result<(), NetworkError>>,
},
DynamicWorkDistribution {
operations: Vec<(EdgeId, Vec<LPR>)>,
tx: Sender<Result<(), NetworkError>>,
},
FormProcessingCluster {
task_type: String,
tx: Sender<Result<Vec<PeerId>, NetworkError>>,
},
LearnNetworkPatterns {
tx: Sender<Result<(), NetworkError>>,
},
PatternShare {
node_id: NodeId,
pattern_id: String,
chord_class: Triads,
input: [f32; 3],
output: f32,
tx: Sender<Result<(), NetworkError>>,
},
PatternBatchShare {
node_id: NodeId,
chord_class: Triads,
patterns: Vec<([f32; 3], f32)>,
tx: Sender<Result<(), NetworkError>>,
},
Publish {
topic: String,
data: Vec<u8>,
tx: Sender<Result<(), NetworkError>>,
},
RequestPatternSharing {
tx: Sender<Result<(), NetworkError>>,
},
RequestResourceStatus {
tx: Sender<Result<(), NetworkError>>,
},
Shutdown {
tx: Sender<Result<(), NetworkError>>,
},
SynchronizeMemory {
tx: Sender<Result<(), NetworkError>>,
},
TopologyAwareLearning {
tx: Sender<Result<(), NetworkError>>,
},
}
Expand description
Commands to control the network
Variants§
AllocateTask
Allocate task to peers
Connect
Connect to a peer
DistributeSurfacePatterns
Distribute surface patterns
Fields
tx: Sender<Result<(), NetworkError>>
DynamicWorkDistribution
Create dynamic work distribution
FormProcessingCluster
Form processing cluster
LearnNetworkPatterns
Learn patterns from the network
Fields
tx: Sender<Result<(), NetworkError>>
Pattern sharing between nodes
Share a batch of patterns for a specific chord class
Publish
Publish data to a topic
RequestPatternSharing
Request patterns from all nodes
Fields
tx: Sender<Result<(), NetworkError>>
RequestResourceStatus
Request resource status from peers
Fields
tx: Sender<Result<(), NetworkError>>
Shutdown
Fields
tx: Sender<Result<(), NetworkError>>
SynchronizeMemory
Synchronize memory
Fields
tx: Sender<Result<(), NetworkError>>
TopologyAwareLearning
Create topology-aware learning
Fields
tx: Sender<Result<(), NetworkError>>
Implementations§
Source§impl SubnetCommand
impl SubnetCommand
Sourcepub const fn is_allocate_task(&self) -> bool
pub const fn is_allocate_task(&self) -> bool
Returns true if the enum is SubnetCommand::AllocateTask otherwise false
Sourcepub const fn is_connect(&self) -> bool
pub const fn is_connect(&self) -> bool
Returns true if the enum is SubnetCommand::Connect otherwise false
Sourcepub const fn is_distribute_surface_patterns(&self) -> bool
pub const fn is_distribute_surface_patterns(&self) -> bool
Returns true if the enum is SubnetCommand::DistributeSurfacePatterns otherwise false
Sourcepub const fn is_dynamic_work_distribution(&self) -> bool
pub const fn is_dynamic_work_distribution(&self) -> bool
Returns true if the enum is SubnetCommand::DynamicWorkDistribution otherwise false
Sourcepub const fn is_form_processing_cluster(&self) -> bool
pub const fn is_form_processing_cluster(&self) -> bool
Returns true if the enum is SubnetCommand::FormProcessingCluster otherwise false
Sourcepub const fn is_learn_network_patterns(&self) -> bool
pub const fn is_learn_network_patterns(&self) -> bool
Returns true if the enum is SubnetCommand::LearnNetworkPatterns otherwise false
Returns true if the enum is SubnetCommand::PatternShare otherwise false
Returns true if the enum is SubnetCommand::PatternBatchShare otherwise false
Sourcepub const fn is_publish(&self) -> bool
pub const fn is_publish(&self) -> bool
Returns true if the enum is SubnetCommand::Publish otherwise false
Sourcepub const fn is_request_pattern_sharing(&self) -> bool
pub const fn is_request_pattern_sharing(&self) -> bool
Returns true if the enum is SubnetCommand::RequestPatternSharing otherwise false
Sourcepub const fn is_request_resource_status(&self) -> bool
pub const fn is_request_resource_status(&self) -> bool
Returns true if the enum is SubnetCommand::RequestResourceStatus otherwise false
Sourcepub const fn is_shutdown(&self) -> bool
pub const fn is_shutdown(&self) -> bool
Returns true if the enum is SubnetCommand::Shutdown otherwise false
Sourcepub const fn is_synchronize_memory(&self) -> bool
pub const fn is_synchronize_memory(&self) -> bool
Returns true if the enum is SubnetCommand::SynchronizeMemory otherwise false
Sourcepub const fn is_topology_aware_learning(&self) -> bool
pub const fn is_topology_aware_learning(&self) -> bool
Returns true if the enum is SubnetCommand::TopologyAwareLearning otherwise false
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SubnetCommand
impl !RefUnwindSafe for SubnetCommand
impl Send for SubnetCommand
impl Sync for SubnetCommand
impl Unpin for SubnetCommand
impl !UnwindSafe for SubnetCommand
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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