diff --git a/crates.js b/crates.js index db66e183..9a3fb548 100644 --- a/crates.js +++ b/crates.js @@ -1 +1 @@ -window.ALL_CRATES = ["reactor_rt","vecmap"]; \ No newline at end of file +window.ALL_CRATES = ["reactor_rt"]; \ No newline at end of file diff --git a/help.html b/help.html index 6b9661a8..d68b81d1 100644 --- a/help.html +++ b/help.html @@ -1 +1,2 @@ -Rustdoc help

Rustdoc help

Back
\ No newline at end of file +Help +

Rustdoc help

Back
\ No newline at end of file diff --git a/implementors/core/clone/trait.Clone.js b/implementors/core/clone/trait.Clone.js deleted file mode 100644 index e22a73cc..00000000 --- a/implementors/core/clone/trait.Clone.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl Clone for GlobalReactionId"],["impl<T: Clone + Sync> Clone for PhysicalActionRef<T>"],["impl Clone for MicroStep"],["impl Clone for LocalReactionId"],["impl Clone for PortKind"],["impl Clone for ReactorId"],["impl Clone for Offset"],["impl Clone for TriggerId"],["impl Clone for AsyncCtx"],["impl Clone for EventTag"]], -"vecmap":[["impl<K: Clone> Clone for KeyRef<K>"],["impl<K: Clone + Eq + Ord, V: Clone> Clone for VecMap<K, V>"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/cmp/trait.Eq.js b/implementors/core/cmp/trait.Eq.js deleted file mode 100644 index 97089d6b..00000000 --- a/implementors/core/cmp/trait.Eq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl Eq for GlobalReactionId"],["impl Eq for ReactorId"],["impl Eq for MicroStep"],["impl Eq for EventTag"],["impl Eq for Offset"],["impl Eq for TriggerId"],["impl Eq for PortKind"],["impl Eq for LocalReactionId"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/cmp/trait.Ord.js b/implementors/core/cmp/trait.Ord.js deleted file mode 100644 index c078f77f..00000000 --- a/implementors/core/cmp/trait.Ord.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl Ord for GlobalReactionId"],["impl Ord for TriggerId"],["impl Ord for EventTag"],["impl Ord for MicroStep"],["impl Ord for ReactorId"],["impl Ord for LocalReactionId"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/cmp/trait.PartialEq.js b/implementors/core/cmp/trait.PartialEq.js deleted file mode 100644 index 63b6da32..00000000 --- a/implementors/core/cmp/trait.PartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl PartialEq<EventTag> for EventTag"],["impl PartialEq<ReactorId> for ReactorId"],["impl PartialEq<GlobalReactionId> for GlobalReactionId"],["impl PartialEq<MicroStep> for MicroStep"],["impl PartialEq<Offset> for Offset"],["impl PartialEq<LocalReactionId> for LocalReactionId"],["impl PartialEq<PortKind> for PortKind"],["impl PartialEq<TriggerId> for TriggerId"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/cmp/trait.PartialOrd.js b/implementors/core/cmp/trait.PartialOrd.js deleted file mode 100644 index 913c6beb..00000000 --- a/implementors/core/cmp/trait.PartialOrd.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl PartialOrd<ReactorId> for ReactorId"],["impl PartialOrd<LocalReactionId> for LocalReactionId"],["impl PartialOrd<TriggerId> for TriggerId"],["impl PartialOrd<EventTag> for EventTag"],["impl PartialOrd<GlobalReactionId> for GlobalReactionId"],["impl PartialOrd<MicroStep> for MicroStep"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/convert/trait.From.js b/implementors/core/convert/trait.From.js deleted file mode 100644 index 3996b7de..00000000 --- a/implementors/core/convert/trait.From.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"vecmap":[["impl<K> From<K> for KeyRef<K>"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/default/trait.Default.js b/implementors/core/default/trait.Default.js deleted file mode 100644 index 7d981f05..00000000 --- a/implementors/core/default/trait.Default.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl Default for SchedulerOptions"]], -"vecmap":[["impl<K: Ord + Eq, V> Default for VecMap<K, V>"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/fmt/trait.Debug.js b/implementors/core/fmt/trait.Debug.js deleted file mode 100644 index 6a98f931..00000000 --- a/implementors/core/fmt/trait.Debug.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl Debug for TimeUnit"],["impl Debug for PortKind"],["impl Debug for GlobalReactionId"],["impl Debug for TriggerId"],["impl Debug for Offset"],["impl Debug for MicroStep"],["impl Debug for ReactorId"],["impl Debug for LocalReactionId"],["impl Debug for EventTag"]], -"vecmap":[["impl<K: Ord + Eq + Debug, V: Debug> Debug for VecMap<K, V>"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/fmt/trait.Display.js b/implementors/core/fmt/trait.Display.js deleted file mode 100644 index cf4c3027..00000000 --- a/implementors/core/fmt/trait.Display.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl Display for GlobalReactionId"],["impl Display for LocalReactionId"],["impl Display for EventTag"],["impl Display for MicroStep"],["impl Display for ReactorId"]], -"vecmap":[["impl<K: Display> Display for KeyRef<K>"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/hash/trait.Hash.js b/implementors/core/hash/trait.Hash.js deleted file mode 100644 index b908a59b..00000000 --- a/implementors/core/hash/trait.Hash.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl Hash for GlobalReactionId"],["impl Hash for MicroStep"],["impl Hash for TriggerId"],["impl Hash for LocalReactionId"],["impl Hash for EventTag"],["impl Hash for Offset"],["impl Hash for PortKind"],["impl Hash for ReactorId"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/iter/traits/collect/trait.IntoIterator.js b/implementors/core/iter/traits/collect/trait.IntoIterator.js deleted file mode 100644 index 268252a7..00000000 --- a/implementors/core/iter/traits/collect/trait.IntoIterator.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl<'a, T: Sync> IntoIterator for &'a mut Multiport<T>"],["impl<'a, T: Sync> IntoIterator for &'a Multiport<T>"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Copy.js b/implementors/core/marker/trait.Copy.js deleted file mode 100644 index a3397e93..00000000 --- a/implementors/core/marker/trait.Copy.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl Copy for EventTag"],["impl Copy for ReactorId"],["impl Copy for LocalReactionId"],["impl Copy for MicroStep"],["impl Copy for Offset"],["impl Copy for TriggerId"],["impl Copy for PortKind"],["impl Copy for GlobalReactionId"]], -"vecmap":[["impl<K: Copy> Copy for KeyRef<K>"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Freeze.js b/implementors/core/marker/trait.Freeze.js deleted file mode 100644 index 3f803015..00000000 --- a/implementors/core/marker/trait.Freeze.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl<T> Freeze for LogicalAction<T>",1,["reactor_rt::actions::LogicalAction"]],["impl<T> Freeze for PhysicalAction<T>",1,["reactor_rt::actions::PhysicalAction"]],["impl<T> Freeze for PhysicalActionRef<T>",1,["reactor_rt::actions::PhysicalActionRef"]],["impl Freeze for LocalReactionId",1,["reactor_rt::ids::LocalReactionId"]],["impl Freeze for ReactorId",1,["reactor_rt::ids::ReactorId"]],["impl Freeze for GlobalReactionId",1,["reactor_rt::ids::GlobalReactionId"]],["impl<T> Freeze for Port<T>",1,["reactor_rt::ports::Port"]],["impl<T> Freeze for Multiport<T>",1,["reactor_rt::ports::Multiport"]],["impl<'x, S> Freeze for AssemblyCtx<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyCtx"]],["impl<'x, S> Freeze for FinishedReactor<'x, S>where\n S: Freeze,",1,["reactor_rt::scheduler::assembly_impl::FinishedReactor"]],["impl<'x, S> Freeze for AssemblyIntermediate<'x, S>where\n S: Freeze,",1,["reactor_rt::scheduler::assembly_impl::AssemblyIntermediate"]],["impl<'a, 'x, S> Freeze for DependencyDeclarator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::DependencyDeclarator"]],["impl<'a, 'x, S> Freeze for ComponentCreator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::ComponentCreator"]],["impl<'a, 'x> Freeze for ReactionCtx<'a, 'x>",1,["reactor_rt::scheduler::context::ReactionCtx"]],["impl Freeze for AsyncCtx",1,["reactor_rt::scheduler::context::AsyncCtx"]],["impl Freeze for Offset",1,["reactor_rt::scheduler::context::Offset"]],["impl Freeze for EventTag",1,["reactor_rt::scheduler::events::EventTag"]],["impl Freeze for SchedulerOptions",1,["reactor_rt::scheduler::scheduler_impl::SchedulerOptions"]],["impl<'x> Freeze for SyncScheduler<'x>",1,["reactor_rt::scheduler::scheduler_impl::SyncScheduler"]],["impl Freeze for MicroStep",1,["reactor_rt::time::MicroStep"]],["impl Freeze for Timer",1,["reactor_rt::timers::Timer"]],["impl Freeze for TriggerId",1,["reactor_rt::triggers::TriggerId"]],["impl Freeze for TimeUnit",1,["reactor_rt::util::TimeUnit"]],["impl Freeze for AssemblyError",1,["reactor_rt::assembly::AssemblyError"]],["impl Freeze for PortKind",1,["reactor_rt::assembly::PortKind"]]], -"vecmap":[["impl<K, V> Freeze for VecMap<K, V>",1,["vecmap::VecMap"]],["impl<'a, K, V> Freeze for Entry<'a, K, V>where\n K: Freeze,",1,["vecmap::Entry"]],["impl<'a, K, V> Freeze for VacantEntry<'a, K, V>where\n K: Freeze,",1,["vecmap::VacantEntry"]],["impl<'a, K, V> Freeze for OccupiedEntry<'a, K, V>where\n K: Freeze,",1,["vecmap::OccupiedEntry"]],["impl<K> Freeze for KeyRef<K>where\n K: Freeze,",1,["vecmap::KeyRef"]]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Send.js b/implementors/core/marker/trait.Send.js deleted file mode 100644 index 5f3d1e10..00000000 --- a/implementors/core/marker/trait.Send.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl<T> Send for LogicalAction<T>where\n T: Send,",1,["reactor_rt::actions::LogicalAction"]],["impl<T> Send for PhysicalAction<T>where\n T: Send,",1,["reactor_rt::actions::PhysicalAction"]],["impl<T> Send for PhysicalActionRef<T>where\n T: Send,",1,["reactor_rt::actions::PhysicalActionRef"]],["impl Send for LocalReactionId",1,["reactor_rt::ids::LocalReactionId"]],["impl Send for ReactorId",1,["reactor_rt::ids::ReactorId"]],["impl Send for GlobalReactionId",1,["reactor_rt::ids::GlobalReactionId"]],["impl<T> !Send for Port<T>",1,["reactor_rt::ports::Port"]],["impl<T> !Send for Multiport<T>",1,["reactor_rt::ports::Multiport"]],["impl<'x, S> !Send for AssemblyCtx<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyCtx"]],["impl<'x, S> !Send for FinishedReactor<'x, S>",1,["reactor_rt::scheduler::assembly_impl::FinishedReactor"]],["impl<'x, S> !Send for AssemblyIntermediate<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyIntermediate"]],["impl<'a, 'x, S> !Send for DependencyDeclarator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::DependencyDeclarator"]],["impl<'a, 'x, S> !Send for ComponentCreator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::ComponentCreator"]],["impl<'a, 'x> Send for ReactionCtx<'a, 'x>",1,["reactor_rt::scheduler::context::ReactionCtx"]],["impl Send for AsyncCtx",1,["reactor_rt::scheduler::context::AsyncCtx"]],["impl Send for Offset",1,["reactor_rt::scheduler::context::Offset"]],["impl Send for EventTag",1,["reactor_rt::scheduler::events::EventTag"]],["impl Send for SchedulerOptions",1,["reactor_rt::scheduler::scheduler_impl::SchedulerOptions"]],["impl<'x> !Send for SyncScheduler<'x>",1,["reactor_rt::scheduler::scheduler_impl::SyncScheduler"]],["impl Send for MicroStep",1,["reactor_rt::time::MicroStep"]],["impl Send for Timer",1,["reactor_rt::timers::Timer"]],["impl Send for TriggerId",1,["reactor_rt::triggers::TriggerId"]],["impl Send for TimeUnit",1,["reactor_rt::util::TimeUnit"]],["impl Send for AssemblyError",1,["reactor_rt::assembly::AssemblyError"]],["impl Send for PortKind",1,["reactor_rt::assembly::PortKind"]]], -"vecmap":[["impl<K, V> Send for VecMap<K, V>where\n K: Send,\n V: Send,",1,["vecmap::VecMap"]],["impl<'a, K, V> Send for Entry<'a, K, V>where\n K: Send,\n V: Send,",1,["vecmap::Entry"]],["impl<'a, K, V> Send for VacantEntry<'a, K, V>where\n K: Send,\n V: Send,",1,["vecmap::VacantEntry"]],["impl<'a, K, V> Send for OccupiedEntry<'a, K, V>where\n K: Send,\n V: Send,",1,["vecmap::OccupiedEntry"]],["impl<K> Send for KeyRef<K>where\n K: Send,",1,["vecmap::KeyRef"]]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.StructuralEq.js b/implementors/core/marker/trait.StructuralEq.js deleted file mode 100644 index 0014e2c6..00000000 --- a/implementors/core/marker/trait.StructuralEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl StructuralEq for MicroStep"],["impl StructuralEq for PortKind"],["impl StructuralEq for ReactorId"],["impl StructuralEq for TriggerId"],["impl StructuralEq for GlobalReactionId"],["impl StructuralEq for EventTag"],["impl StructuralEq for LocalReactionId"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.StructuralPartialEq.js b/implementors/core/marker/trait.StructuralPartialEq.js deleted file mode 100644 index 5c3d3532..00000000 --- a/implementors/core/marker/trait.StructuralPartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl StructuralPartialEq for ReactorId"],["impl StructuralPartialEq for TriggerId"],["impl StructuralPartialEq for EventTag"],["impl StructuralPartialEq for PortKind"],["impl StructuralPartialEq for GlobalReactionId"],["impl StructuralPartialEq for MicroStep"],["impl StructuralPartialEq for LocalReactionId"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Sync.js b/implementors/core/marker/trait.Sync.js deleted file mode 100644 index b5ce0067..00000000 --- a/implementors/core/marker/trait.Sync.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl<T> Sync for LogicalAction<T>",1,["reactor_rt::actions::LogicalAction"]],["impl<T> Sync for PhysicalAction<T>",1,["reactor_rt::actions::PhysicalAction"]],["impl<T> Sync for PhysicalActionRef<T>where\n T: Send,",1,["reactor_rt::actions::PhysicalActionRef"]],["impl Sync for LocalReactionId",1,["reactor_rt::ids::LocalReactionId"]],["impl Sync for ReactorId",1,["reactor_rt::ids::ReactorId"]],["impl Sync for GlobalReactionId",1,["reactor_rt::ids::GlobalReactionId"]],["impl<T> !Sync for Port<T>",1,["reactor_rt::ports::Port"]],["impl<T> !Sync for Multiport<T>",1,["reactor_rt::ports::Multiport"]],["impl<'x, S> !Sync for AssemblyCtx<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyCtx"]],["impl<'x, S> !Sync for FinishedReactor<'x, S>",1,["reactor_rt::scheduler::assembly_impl::FinishedReactor"]],["impl<'x, S> !Sync for AssemblyIntermediate<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyIntermediate"]],["impl<'a, 'x, S> !Sync for DependencyDeclarator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::DependencyDeclarator"]],["impl<'a, 'x, S> !Sync for ComponentCreator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::ComponentCreator"]],["impl<'a, 'x> Sync for ReactionCtx<'a, 'x>",1,["reactor_rt::scheduler::context::ReactionCtx"]],["impl Sync for AsyncCtx",1,["reactor_rt::scheduler::context::AsyncCtx"]],["impl Sync for Offset",1,["reactor_rt::scheduler::context::Offset"]],["impl Sync for EventTag",1,["reactor_rt::scheduler::events::EventTag"]],["impl Sync for SchedulerOptions",1,["reactor_rt::scheduler::scheduler_impl::SchedulerOptions"]],["impl<'x> !Sync for SyncScheduler<'x>",1,["reactor_rt::scheduler::scheduler_impl::SyncScheduler"]],["impl Sync for MicroStep",1,["reactor_rt::time::MicroStep"]],["impl Sync for Timer",1,["reactor_rt::timers::Timer"]],["impl Sync for TriggerId",1,["reactor_rt::triggers::TriggerId"]],["impl Sync for TimeUnit",1,["reactor_rt::util::TimeUnit"]],["impl Sync for AssemblyError",1,["reactor_rt::assembly::AssemblyError"]],["impl Sync for PortKind",1,["reactor_rt::assembly::PortKind"]]], -"vecmap":[["impl<K, V> Sync for VecMap<K, V>where\n K: Sync,\n V: Sync,",1,["vecmap::VecMap"]],["impl<'a, K, V> Sync for Entry<'a, K, V>where\n K: Sync,\n V: Sync,",1,["vecmap::Entry"]],["impl<'a, K, V> Sync for VacantEntry<'a, K, V>where\n K: Sync,\n V: Sync,",1,["vecmap::VacantEntry"]],["impl<'a, K, V> Sync for OccupiedEntry<'a, K, V>where\n K: Sync,\n V: Sync,",1,["vecmap::OccupiedEntry"]],["impl<K> Sync for KeyRef<K>where\n K: Sync,",1,["vecmap::KeyRef"]]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Unpin.js b/implementors/core/marker/trait.Unpin.js deleted file mode 100644 index 48fe0b89..00000000 --- a/implementors/core/marker/trait.Unpin.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl<T> Unpin for LogicalAction<T>where\n T: Unpin,",1,["reactor_rt::actions::LogicalAction"]],["impl<T> Unpin for PhysicalAction<T>where\n T: Unpin,",1,["reactor_rt::actions::PhysicalAction"]],["impl<T> Unpin for PhysicalActionRef<T>",1,["reactor_rt::actions::PhysicalActionRef"]],["impl Unpin for LocalReactionId",1,["reactor_rt::ids::LocalReactionId"]],["impl Unpin for ReactorId",1,["reactor_rt::ids::ReactorId"]],["impl Unpin for GlobalReactionId",1,["reactor_rt::ids::GlobalReactionId"]],["impl<T> Unpin for Port<T>",1,["reactor_rt::ports::Port"]],["impl<T> Unpin for Multiport<T>",1,["reactor_rt::ports::Multiport"]],["impl<'x, S> Unpin for AssemblyCtx<'x, S>where\n S: Unpin,",1,["reactor_rt::scheduler::assembly_impl::AssemblyCtx"]],["impl<'x, S> Unpin for FinishedReactor<'x, S>where\n S: Unpin,",1,["reactor_rt::scheduler::assembly_impl::FinishedReactor"]],["impl<'x, S> Unpin for AssemblyIntermediate<'x, S>where\n S: Unpin,",1,["reactor_rt::scheduler::assembly_impl::AssemblyIntermediate"]],["impl<'a, 'x, S> Unpin for DependencyDeclarator<'a, 'x, S>where\n 'x: 'a,",1,["reactor_rt::scheduler::assembly_impl::DependencyDeclarator"]],["impl<'a, 'x, S> Unpin for ComponentCreator<'a, 'x, S>where\n 'x: 'a,",1,["reactor_rt::scheduler::assembly_impl::ComponentCreator"]],["impl<'a, 'x> Unpin for ReactionCtx<'a, 'x>",1,["reactor_rt::scheduler::context::ReactionCtx"]],["impl Unpin for AsyncCtx",1,["reactor_rt::scheduler::context::AsyncCtx"]],["impl Unpin for Offset",1,["reactor_rt::scheduler::context::Offset"]],["impl Unpin for EventTag",1,["reactor_rt::scheduler::events::EventTag"]],["impl Unpin for SchedulerOptions",1,["reactor_rt::scheduler::scheduler_impl::SchedulerOptions"]],["impl<'x> Unpin for SyncScheduler<'x>",1,["reactor_rt::scheduler::scheduler_impl::SyncScheduler"]],["impl Unpin for MicroStep",1,["reactor_rt::time::MicroStep"]],["impl Unpin for Timer",1,["reactor_rt::timers::Timer"]],["impl Unpin for TriggerId",1,["reactor_rt::triggers::TriggerId"]],["impl Unpin for TimeUnit",1,["reactor_rt::util::TimeUnit"]],["impl Unpin for AssemblyError",1,["reactor_rt::assembly::AssemblyError"]],["impl Unpin for PortKind",1,["reactor_rt::assembly::PortKind"]]], -"vecmap":[["impl<K, V> Unpin for VecMap<K, V>where\n K: Unpin,\n V: Unpin,",1,["vecmap::VecMap"]],["impl<'a, K, V> Unpin for Entry<'a, K, V>where\n K: Unpin,",1,["vecmap::Entry"]],["impl<'a, K, V> Unpin for VacantEntry<'a, K, V>where\n K: Unpin,",1,["vecmap::VacantEntry"]],["impl<'a, K, V> Unpin for OccupiedEntry<'a, K, V>where\n K: Unpin,",1,["vecmap::OccupiedEntry"]],["impl<K> Unpin for KeyRef<K>where\n K: Unpin,",1,["vecmap::KeyRef"]]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js b/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js deleted file mode 100644 index 3ed303fc..00000000 --- a/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl<T> RefUnwindSafe for LogicalAction<T>where\n T: RefUnwindSafe,",1,["reactor_rt::actions::LogicalAction"]],["impl<T> RefUnwindSafe for PhysicalAction<T>where\n T: RefUnwindSafe,",1,["reactor_rt::actions::PhysicalAction"]],["impl<T> RefUnwindSafe for PhysicalActionRef<T>",1,["reactor_rt::actions::PhysicalActionRef"]],["impl RefUnwindSafe for LocalReactionId",1,["reactor_rt::ids::LocalReactionId"]],["impl RefUnwindSafe for ReactorId",1,["reactor_rt::ids::ReactorId"]],["impl RefUnwindSafe for GlobalReactionId",1,["reactor_rt::ids::GlobalReactionId"]],["impl<T> !RefUnwindSafe for Port<T>",1,["reactor_rt::ports::Port"]],["impl<T> !RefUnwindSafe for Multiport<T>",1,["reactor_rt::ports::Multiport"]],["impl<'x, S> !RefUnwindSafe for AssemblyCtx<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyCtx"]],["impl<'x, S> !RefUnwindSafe for FinishedReactor<'x, S>",1,["reactor_rt::scheduler::assembly_impl::FinishedReactor"]],["impl<'x, S> !RefUnwindSafe for AssemblyIntermediate<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyIntermediate"]],["impl<'a, 'x, S> !RefUnwindSafe for DependencyDeclarator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::DependencyDeclarator"]],["impl<'a, 'x, S> !RefUnwindSafe for ComponentCreator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::ComponentCreator"]],["impl<'a, 'x> RefUnwindSafe for ReactionCtx<'a, 'x>",1,["reactor_rt::scheduler::context::ReactionCtx"]],["impl RefUnwindSafe for AsyncCtx",1,["reactor_rt::scheduler::context::AsyncCtx"]],["impl RefUnwindSafe for Offset",1,["reactor_rt::scheduler::context::Offset"]],["impl RefUnwindSafe for EventTag",1,["reactor_rt::scheduler::events::EventTag"]],["impl RefUnwindSafe for SchedulerOptions",1,["reactor_rt::scheduler::scheduler_impl::SchedulerOptions"]],["impl<'x> !RefUnwindSafe for SyncScheduler<'x>",1,["reactor_rt::scheduler::scheduler_impl::SyncScheduler"]],["impl RefUnwindSafe for MicroStep",1,["reactor_rt::time::MicroStep"]],["impl RefUnwindSafe for Timer",1,["reactor_rt::timers::Timer"]],["impl RefUnwindSafe for TriggerId",1,["reactor_rt::triggers::TriggerId"]],["impl RefUnwindSafe for TimeUnit",1,["reactor_rt::util::TimeUnit"]],["impl RefUnwindSafe for AssemblyError",1,["reactor_rt::assembly::AssemblyError"]],["impl RefUnwindSafe for PortKind",1,["reactor_rt::assembly::PortKind"]]], -"vecmap":[["impl<K, V> RefUnwindSafe for VecMap<K, V>where\n K: RefUnwindSafe,\n V: RefUnwindSafe,",1,["vecmap::VecMap"]],["impl<'a, K, V> RefUnwindSafe for Entry<'a, K, V>where\n K: RefUnwindSafe,\n V: RefUnwindSafe,",1,["vecmap::Entry"]],["impl<'a, K, V> RefUnwindSafe for VacantEntry<'a, K, V>where\n K: RefUnwindSafe,\n V: RefUnwindSafe,",1,["vecmap::VacantEntry"]],["impl<'a, K, V> RefUnwindSafe for OccupiedEntry<'a, K, V>where\n K: RefUnwindSafe,\n V: RefUnwindSafe,",1,["vecmap::OccupiedEntry"]],["impl<K> RefUnwindSafe for KeyRef<K>where\n K: RefUnwindSafe,",1,["vecmap::KeyRef"]]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/panic/unwind_safe/trait.UnwindSafe.js b/implementors/core/panic/unwind_safe/trait.UnwindSafe.js deleted file mode 100644 index 5cba504b..00000000 --- a/implementors/core/panic/unwind_safe/trait.UnwindSafe.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl<T> UnwindSafe for LogicalAction<T>where\n T: UnwindSafe,",1,["reactor_rt::actions::LogicalAction"]],["impl<T> UnwindSafe for PhysicalAction<T>where\n T: UnwindSafe,",1,["reactor_rt::actions::PhysicalAction"]],["impl<T> UnwindSafe for PhysicalActionRef<T>",1,["reactor_rt::actions::PhysicalActionRef"]],["impl UnwindSafe for LocalReactionId",1,["reactor_rt::ids::LocalReactionId"]],["impl UnwindSafe for ReactorId",1,["reactor_rt::ids::ReactorId"]],["impl UnwindSafe for GlobalReactionId",1,["reactor_rt::ids::GlobalReactionId"]],["impl<T> !UnwindSafe for Port<T>",1,["reactor_rt::ports::Port"]],["impl<T> !UnwindSafe for Multiport<T>",1,["reactor_rt::ports::Multiport"]],["impl<'x, S> !UnwindSafe for AssemblyCtx<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyCtx"]],["impl<'x, S> !UnwindSafe for FinishedReactor<'x, S>",1,["reactor_rt::scheduler::assembly_impl::FinishedReactor"]],["impl<'x, S> !UnwindSafe for AssemblyIntermediate<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyIntermediate"]],["impl<'a, 'x, S> !UnwindSafe for DependencyDeclarator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::DependencyDeclarator"]],["impl<'a, 'x, S> !UnwindSafe for ComponentCreator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::ComponentCreator"]],["impl<'a, 'x> UnwindSafe for ReactionCtx<'a, 'x>",1,["reactor_rt::scheduler::context::ReactionCtx"]],["impl UnwindSafe for AsyncCtx",1,["reactor_rt::scheduler::context::AsyncCtx"]],["impl UnwindSafe for Offset",1,["reactor_rt::scheduler::context::Offset"]],["impl UnwindSafe for EventTag",1,["reactor_rt::scheduler::events::EventTag"]],["impl UnwindSafe for SchedulerOptions",1,["reactor_rt::scheduler::scheduler_impl::SchedulerOptions"]],["impl<'x> !UnwindSafe for SyncScheduler<'x>",1,["reactor_rt::scheduler::scheduler_impl::SyncScheduler"]],["impl UnwindSafe for MicroStep",1,["reactor_rt::time::MicroStep"]],["impl UnwindSafe for Timer",1,["reactor_rt::timers::Timer"]],["impl UnwindSafe for TriggerId",1,["reactor_rt::triggers::TriggerId"]],["impl UnwindSafe for TimeUnit",1,["reactor_rt::util::TimeUnit"]],["impl UnwindSafe for AssemblyError",1,["reactor_rt::assembly::AssemblyError"]],["impl UnwindSafe for PortKind",1,["reactor_rt::assembly::PortKind"]]], -"vecmap":[["impl<K, V> UnwindSafe for VecMap<K, V>where\n K: UnwindSafe,\n V: UnwindSafe,",1,["vecmap::VecMap"]],["impl<'a, K, V> !UnwindSafe for Entry<'a, K, V>",1,["vecmap::Entry"]],["impl<'a, K, V> !UnwindSafe for VacantEntry<'a, K, V>",1,["vecmap::VacantEntry"]],["impl<'a, K, V> !UnwindSafe for OccupiedEntry<'a, K, V>",1,["vecmap::OccupiedEntry"]],["impl<K> UnwindSafe for KeyRef<K>where\n K: UnwindSafe,",1,["vecmap::KeyRef"]]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/index_vec/trait.Idx.js b/implementors/index_vec/trait.Idx.js deleted file mode 100644 index d547db92..00000000 --- a/implementors/index_vec/trait.Idx.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"reactor_rt":[["impl Idx for LocalReactionId"],["impl Idx for ReactorId"],["impl Idx for TriggerId"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/reactor_rt/actions/struct.LogicalAction.html b/reactor_rt/actions/struct.LogicalAction.html index 92d5c100..8439d227 100644 --- a/reactor_rt/actions/struct.LogicalAction.html +++ b/reactor_rt/actions/struct.LogicalAction.html @@ -1,11 +1,11 @@ - + Redirection -

Redirecting to ../../reactor_rt/prelude/struct.LogicalAction.html...

- +

Redirecting to ../../reactor_rt/struct.LogicalAction.html...

+ \ No newline at end of file diff --git a/reactor_rt/actions/struct.PhysicalActionRef.html b/reactor_rt/actions/struct.PhysicalActionRef.html index d092c6f2..6994fca0 100644 --- a/reactor_rt/actions/struct.PhysicalActionRef.html +++ b/reactor_rt/actions/struct.PhysicalActionRef.html @@ -1,11 +1,11 @@ - + Redirection -

Redirecting to ../../reactor_rt/prelude/struct.PhysicalActionRef.html...

- +

Redirecting to ../../reactor_rt/struct.PhysicalActionRef.html...

+ \ No newline at end of file diff --git a/reactor_rt/all.html b/reactor_rt/all.html index d4ff1531..71f0cca1 100644 --- a/reactor_rt/all.html +++ b/reactor_rt/all.html @@ -1 +1,2 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Type Definitions

\ No newline at end of file +List of all items in this crate +

List of all items

Structs

Enums

Traits

Macros

Functions

Type Aliases

\ No newline at end of file diff --git a/reactor_rt/assembly/enum.PortKind.html b/reactor_rt/assembly/enum.PortKind.html index 4ef0614e..9ad57a9c 100644 --- a/reactor_rt/assembly/enum.PortKind.html +++ b/reactor_rt/assembly/enum.PortKind.html @@ -1,24 +1,27 @@ -PortKind in reactor_rt::assembly - Rust
pub enum PortKind {
+PortKind in reactor_rt::assembly - Rust
+    
pub enum PortKind {
     Input,
     Output,
     ChildInputReference,
     ChildOutputReference,
 }
Expand description

Kind of a port.

-

Variants§

§

Input

§

Output

§

ChildInputReference

§

ChildOutputReference

Trait Implementations§

source§

impl Clone for PortKind

source§

fn clone(&self) -> PortKind

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for PortKind

source§

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

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

impl Hash for PortKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<PortKind> for PortKind

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Copy for PortKind

source§

impl Eq for PortKind

source§

impl StructuralEq for PortKind

source§

impl StructuralPartialEq for PortKind

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+

Variants§

§

Input

§

Output

§

ChildInputReference

§

ChildOutputReference

Trait Implementations§

source§

impl Clone for PortKind

source§

fn clone(&self) -> PortKind

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for PortKind

source§

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

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

impl Hash for PortKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for PortKind

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for PortKind

source§

impl Eq for PortKind

source§

impl StructuralEq for PortKind

source§

impl StructuralPartialEq for PortKind

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
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for Twhere - T: Clone,

§

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 Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/assembly/index.html b/reactor_rt/assembly/index.html index 915d4cdc..50f6f674 100644 --- a/reactor_rt/assembly/index.html +++ b/reactor_rt/assembly/index.html @@ -1,5 +1,6 @@ -reactor_rt::assembly - Rust

Module reactor_rt::assembly

source ·
Expand description

Module containing the API to initialize a reactor program.

-

Structs

Enums

Traits

Type Aliases

\ No newline at end of file diff --git a/reactor_rt/assembly/struct.AssemblyCtx.html b/reactor_rt/assembly/struct.AssemblyCtx.html index 00c3fa15..0e456e6e 100644 --- a/reactor_rt/assembly/struct.AssemblyCtx.html +++ b/reactor_rt/assembly/struct.AssemblyCtx.html @@ -1,46 +1,47 @@ -AssemblyCtx in reactor_rt::assembly - Rust
pub struct AssemblyCtx<'x, S>where
-    S: ReactorInitializer,{ /* private fields */ }
Expand description

Helper struct to assemble reactors during initialization. +AssemblyCtx in reactor_rt::assembly - Rust

+
pub struct AssemblyCtx<'x, S>
where + S: ReactorInitializer,
{ /* private fields */ }
Expand description

Helper struct to assemble reactors during initialization. One assembly context is used per reactor, they can’t be shared.

-

Implementations§

source§

impl<'x, S> AssemblyCtx<'x, S>where - S: ReactorInitializer,

source

pub fn assemble( +

Implementations§

source§

impl<'x, S> AssemblyCtx<'x, S>
where + S: ReactorInitializer,

source

pub fn assemble( self, - build_reactor_tree: impl FnOnce(Self) -> AssemblyResult<AssemblyIntermediate<'x, S>> + build_reactor_tree: impl FnOnce(Self) -> AssemblyResult<AssemblyIntermediate<'x, S>> ) -> AssemblyResult<FinishedReactor<'x, S>>

top level function

-
source

pub fn assemble_self<const N: usize>( +

source

pub fn assemble_self<const N: usize>( self, - create_self: impl FnOnce(&mut ComponentCreator<'_, '_, S>, ReactorId) -> Result<S, AssemblyError>, - num_non_synthetic_reactions: usize, - reaction_names: [Option<&'static str>; N], - declare_dependencies: impl FnOnce(&mut DependencyDeclarator<'_, '_, S>, &mut S, [GlobalReactionId; N]) -> AssemblyResult<()> + create_self: impl FnOnce(&mut ComponentCreator<'_, '_, S>, ReactorId) -> Result<S, AssemblyError>, + num_non_synthetic_reactions: usize, + reaction_names: [Option<&'static str>; N], + declare_dependencies: impl FnOnce(&mut DependencyDeclarator<'_, '_, S>, &mut S, [GlobalReactionId; N]) -> AssemblyResult<()> ) -> AssemblyResult<AssemblyIntermediate<'x, S>>

Innermost function.

-
source

pub fn with_child<Sub: ReactorInitializer + 'static, F>( +

source

pub fn with_child<Sub: ReactorInitializer + 'static, F>( self, - inst_name: &'static str, + inst_name: &'static str, args: Sub::Params, action: F -) -> AssemblyResult<AssemblyIntermediate<'x, S>>where - F: FnOnce(Self, &mut Sub) -> AssemblyResult<AssemblyIntermediate<'x, S>>,

Assembles a child reactor and makes it available in +) -> AssemblyResult<AssemblyIntermediate<'x, S>>

where + F: FnOnce(Self, &mut Sub) -> AssemblyResult<AssemblyIntermediate<'x, S>>,

Assembles a child reactor and makes it available in the scope of a function.

-
source

pub fn with_child_bank<Sub, A, F>( +

source

pub fn with_child_bank<Sub, A, F>( self, - inst_name: &'static str, - bank_width: usize, + inst_name: &'static str, + bank_width: usize, arg_maker: A, action: F -) -> AssemblyResult<AssemblyIntermediate<'x, S>>where +) -> AssemblyResult<AssemblyIntermediate<'x, S>>
where Sub: ReactorInitializer + 'static, - F: FnOnce(Self, &mut Vec<Sub>) -> AssemblyResult<AssemblyIntermediate<'x, S>>, - A: Fn(usize) -> Sub::Params,

Assembles a bank of children reactor and makes it + F: FnOnce(Self, &mut Vec<Sub>) -> AssemblyResult<AssemblyIntermediate<'x, S>>, + A: Fn(usize) -> Sub::Params,

Assembles a bank of children reactor and makes it available in the scope of a function.

-

Auto Trait Implementations§

§

impl<'x, S> !RefUnwindSafe for AssemblyCtx<'x, S>

§

impl<'x, S> !Send for AssemblyCtx<'x, S>

§

impl<'x, S> !Sync for AssemblyCtx<'x, S>

§

impl<'x, S> Unpin for AssemblyCtx<'x, S>where - S: Unpin,

§

impl<'x, S> !UnwindSafe for AssemblyCtx<'x, S>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

§

impl<'x, S> !RefUnwindSafe for AssemblyCtx<'x, S>

§

impl<'x, S> !Send for AssemblyCtx<'x, S>

§

impl<'x, S> !Sync for AssemblyCtx<'x, S>

§

impl<'x, S> Unpin for AssemblyCtx<'x, S>
where + S: Unpin,

§

impl<'x, S> !UnwindSafe for AssemblyCtx<'x, S>

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/assembly/struct.AssemblyError.html b/reactor_rt/assembly/struct.AssemblyError.html index a3fa25cf..62868900 100644 --- a/reactor_rt/assembly/struct.AssemblyError.html +++ b/reactor_rt/assembly/struct.AssemblyError.html @@ -1,14 +1,15 @@ -AssemblyError in reactor_rt::assembly - Rust
pub struct AssemblyError(_);
Expand description

An error occurring during initialization of the reactor program. +AssemblyError in reactor_rt::assembly - Rust

+
pub struct AssemblyError(/* private fields */);
Expand description

An error occurring during initialization of the reactor program. Should never occur unless the graph is built by hand, and not by a Lingua Franca compiler.

-

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/assembly/struct.AssemblyIntermediate.html b/reactor_rt/assembly/struct.AssemblyIntermediate.html index 0ba6e953..329073c7 100644 --- a/reactor_rt/assembly/struct.AssemblyIntermediate.html +++ b/reactor_rt/assembly/struct.AssemblyIntermediate.html @@ -1,15 +1,16 @@ -AssemblyIntermediate in reactor_rt::assembly - Rust
pub struct AssemblyIntermediate<'x, S>(_, _)
+AssemblyIntermediate in reactor_rt::assembly - Rust
+    
pub struct AssemblyIntermediate<'x, S>(/* private fields */)
 where
-         S: ReactorInitializer;
Expand description

Intermediate result of assembly.

-

Auto Trait Implementations§

§

impl<'x, S> !RefUnwindSafe for AssemblyIntermediate<'x, S>

§

impl<'x, S> !Send for AssemblyIntermediate<'x, S>

§

impl<'x, S> !Sync for AssemblyIntermediate<'x, S>

§

impl<'x, S> Unpin for AssemblyIntermediate<'x, S>where - S: Unpin,

§

impl<'x, S> !UnwindSafe for AssemblyIntermediate<'x, S>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+ S: ReactorInitializer;
Expand description

Intermediate result of assembly.

+

Auto Trait Implementations§

§

impl<'x, S> !RefUnwindSafe for AssemblyIntermediate<'x, S>

§

impl<'x, S> !Send for AssemblyIntermediate<'x, S>

§

impl<'x, S> !Sync for AssemblyIntermediate<'x, S>

§

impl<'x, S> Unpin for AssemblyIntermediate<'x, S>
where + S: Unpin,

§

impl<'x, S> !UnwindSafe for AssemblyIntermediate<'x, S>

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/assembly/struct.ComponentCreator.html b/reactor_rt/assembly/struct.ComponentCreator.html index f13576ae..d683a807 100644 --- a/reactor_rt/assembly/struct.ComponentCreator.html +++ b/reactor_rt/assembly/struct.ComponentCreator.html @@ -1,35 +1,35 @@ -ComponentCreator in reactor_rt::assembly - Rust
pub struct ComponentCreator<'a, 'x, S: ReactorInitializer> { /* private fields */ }
Expand description

Creates the components of a reactor.

-

Implementations§

source§

impl<S: ReactorInitializer> ComponentCreator<'_, '_, S>

source

pub fn new_port<T: Sync>( +ComponentCreator in reactor_rt::assembly - Rust +
pub struct ComponentCreator<'a, 'x, S: ReactorInitializer> { /* private fields */ }
Expand description

Creates the components of a reactor.

+

Implementations§

source§

impl<S: ReactorInitializer> ComponentCreator<'_, '_, S>

source

pub fn new_port<T: Sync>( &mut self, - lf_name: &'static str, + lf_name: &'static str, kind: PortKind -) -> Port<T>

source

pub fn new_multiport<T: Sync>( +) -> Port<T>

source

pub fn new_multiport<T: Sync>( &mut self, - lf_name: &'static str, + lf_name: &'static str, kind: PortKind, - len: usize -) -> Result<Multiport<T>, AssemblyError>

source

pub fn new_logical_action<T: Sync>( + len: usize +) -> Result<Multiport<T>, AssemblyError>

source

pub fn new_logical_action<T: Sync>( &mut self, - lf_name: &'static str, - min_delay: Option<Duration> -) -> LogicalAction<T>

source

pub fn new_physical_action<T: Sync>( + lf_name: &'static str, + min_delay: Option<Duration> +) -> LogicalAction<T>

source

pub fn new_physical_action<T: Sync>( &mut self, - lf_name: &'static str, - min_delay: Option<Duration> -) -> PhysicalActionRef<T>

source

pub fn new_timer( + lf_name: &'static str, + min_delay: Option<Duration> +) -> PhysicalActionRef<T>

source

pub fn new_timer( &mut self, - lf_name: &'static str, + lf_name: &'static str, offset: Duration, period: Duration -) -> Timer

Auto Trait Implementations§

§

impl<'a, 'x, S> !RefUnwindSafe for ComponentCreator<'a, 'x, S>

§

impl<'a, 'x, S> !Send for ComponentCreator<'a, 'x, S>

§

impl<'a, 'x, S> !Sync for ComponentCreator<'a, 'x, S>

§

impl<'a, 'x, S> Unpin for ComponentCreator<'a, 'x, S>where - 'x: 'a,

§

impl<'a, 'x, S> !UnwindSafe for ComponentCreator<'a, 'x, S>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+) -> Timer

Auto Trait Implementations§

§

impl<'a, 'x, S> !RefUnwindSafe for ComponentCreator<'a, 'x, S>

§

impl<'a, 'x, S> !Send for ComponentCreator<'a, 'x, S>

§

impl<'a, 'x, S> !Sync for ComponentCreator<'a, 'x, S>

§

impl<'a, 'x, S> Unpin for ComponentCreator<'a, 'x, S>

§

impl<'a, 'x, S> !UnwindSafe for ComponentCreator<'a, 'x, S>

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/assembly/struct.DependencyDeclarator.html b/reactor_rt/assembly/struct.DependencyDeclarator.html index e4499828..89a49510 100644 --- a/reactor_rt/assembly/struct.DependencyDeclarator.html +++ b/reactor_rt/assembly/struct.DependencyDeclarator.html @@ -1,46 +1,46 @@ -DependencyDeclarator in reactor_rt::assembly - Rust
pub struct DependencyDeclarator<'a, 'x, S: ReactorInitializer> { /* private fields */ }
Expand description

Declares dependencies between components and reactions.

-

Implementations§

source§

impl<S: ReactorInitializer> DependencyDeclarator<'_, '_, S>

source

pub fn declare_triggers( +DependencyDeclarator in reactor_rt::assembly - Rust +
pub struct DependencyDeclarator<'a, 'x, S: ReactorInitializer> { /* private fields */ }
Expand description

Declares dependencies between components and reactions.

+

Implementations§

source§

impl<S: ReactorInitializer> DependencyDeclarator<'_, '_, S>

source

pub fn declare_triggers( &mut self, trigger: TriggerId, reaction: GlobalReactionId -) -> AssemblyResult<()>

source

pub fn effects_port<T: Sync>( +) -> AssemblyResult<()>

source

pub fn effects_port<T: Sync>( &mut self, reaction: GlobalReactionId, - port: &Port<T> -) -> AssemblyResult<()>

source

pub fn effects_multiport<T: Sync>( + port: &Port<T> +) -> AssemblyResult<()>

source

pub fn effects_multiport<T: Sync>( &mut self, reaction: GlobalReactionId, - port: &Multiport<T> -) -> AssemblyResult<()>

source

pub fn declare_uses( + port: &Multiport<T> +) -> AssemblyResult<()>

source

pub fn declare_uses( &mut self, reaction: GlobalReactionId, trigger: TriggerId -) -> AssemblyResult<()>

source

pub fn bind_ports<T: Sync>( +) -> AssemblyResult<()>

source

pub fn bind_ports<T: Sync>( &mut self, - upstream: &mut Port<T>, - downstream: &mut Port<T> -) -> AssemblyResult<()>

Bind two ports together.

-
source

pub fn bind_ports_zip<'a, T: Sync + 'a>( + upstream: &mut Port<T>, + downstream: &mut Port<T> +) -> AssemblyResult<()>

Bind two ports together.

+
source

pub fn bind_ports_zip<'a, T: Sync + 'a>( &mut self, - upstream: impl Iterator<Item = &'a mut Port<T>>, - downstream: impl Iterator<Item = &'a mut Port<T>> -) -> AssemblyResult<()>

Bind the ports of the upstream to those of the downstream, + upstream: impl Iterator<Item = &'a mut Port<T>>, + downstream: impl Iterator<Item = &'a mut Port<T>> +) -> AssemblyResult<()>

Bind the ports of the upstream to those of the downstream, as if zipping both iterators. todo this will just throw away bindings if both iterators are not of the same size normally this should be reported by LFC as a warning, maybe we should implement the same thing here

-
source

pub fn bind_ports_iterated<'a, T: Sync + 'a>( +

source

pub fn bind_ports_iterated<'a, T: Sync + 'a>( &mut self, - upstream: impl Iterator<Item = &'a mut Port<T>>, - downstream: impl Iterator<Item = &'a mut Port<T>> -) -> AssemblyResult<()>

Auto Trait Implementations§

§

impl<'a, 'x, S> !RefUnwindSafe for DependencyDeclarator<'a, 'x, S>

§

impl<'a, 'x, S> !Send for DependencyDeclarator<'a, 'x, S>

§

impl<'a, 'x, S> !Sync for DependencyDeclarator<'a, 'x, S>

§

impl<'a, 'x, S> Unpin for DependencyDeclarator<'a, 'x, S>where - 'x: 'a,

§

impl<'a, 'x, S> !UnwindSafe for DependencyDeclarator<'a, 'x, S>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+ upstream: impl Iterator<Item = &'a mut Port<T>>, + downstream: impl Iterator<Item = &'a mut Port<T>> +) -> AssemblyResult<()>

Auto Trait Implementations§

§

impl<'a, 'x, S> !RefUnwindSafe for DependencyDeclarator<'a, 'x, S>

§

impl<'a, 'x, S> !Send for DependencyDeclarator<'a, 'x, S>

§

impl<'a, 'x, S> !Sync for DependencyDeclarator<'a, 'x, S>

§

impl<'a, 'x, S> Unpin for DependencyDeclarator<'a, 'x, S>

§

impl<'a, 'x, S> !UnwindSafe for DependencyDeclarator<'a, 'x, S>

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/assembly/struct.FinishedReactor.html b/reactor_rt/assembly/struct.FinishedReactor.html index b10c3ba8..03520e1a 100644 --- a/reactor_rt/assembly/struct.FinishedReactor.html +++ b/reactor_rt/assembly/struct.FinishedReactor.html @@ -1,15 +1,16 @@ -FinishedReactor in reactor_rt::assembly - Rust
pub struct FinishedReactor<'x, S>(_, _)
+FinishedReactor in reactor_rt::assembly - Rust
+    
pub struct FinishedReactor<'x, S>(/* private fields */)
 where
-         S: ReactorInitializer;
Expand description

Final result of the assembly of a reactor.

-

Auto Trait Implementations§

§

impl<'x, S> !RefUnwindSafe for FinishedReactor<'x, S>

§

impl<'x, S> !Send for FinishedReactor<'x, S>

§

impl<'x, S> !Sync for FinishedReactor<'x, S>

§

impl<'x, S> Unpin for FinishedReactor<'x, S>where - S: Unpin,

§

impl<'x, S> !UnwindSafe for FinishedReactor<'x, S>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+ S: ReactorInitializer;
Expand description

Final result of the assembly of a reactor.

+

Auto Trait Implementations§

§

impl<'x, S> !RefUnwindSafe for FinishedReactor<'x, S>

§

impl<'x, S> !Send for FinishedReactor<'x, S>

§

impl<'x, S> !Sync for FinishedReactor<'x, S>

§

impl<'x, S> Unpin for FinishedReactor<'x, S>
where + S: Unpin,

§

impl<'x, S> !UnwindSafe for FinishedReactor<'x, S>

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/assembly/struct.GlobalReactionId.html b/reactor_rt/assembly/struct.GlobalReactionId.html index d2e1989b..2feaf316 100644 --- a/reactor_rt/assembly/struct.GlobalReactionId.html +++ b/reactor_rt/assembly/struct.GlobalReactionId.html @@ -1,26 +1,31 @@ -GlobalReactionId in reactor_rt::assembly - Rust
pub struct GlobalReactionId(_);
Expand description

Global identifier for a reaction.

-

Implementations§

source§

impl GlobalReactionId

source

pub fn new(container: ReactorId, local: LocalReactionId) -> Self

Trait Implementations§

source§

impl Clone for GlobalReactionId

source§

fn clone(&self) -> GlobalReactionId

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for GlobalReactionId

source§

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

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

impl Display for GlobalReactionId

source§

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

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

impl Hash for GlobalReactionId

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for GlobalReactionId

source§

fn cmp(&self, other: &GlobalReactionId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<GlobalReactionId> for GlobalReactionId

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<GlobalReactionId> for GlobalReactionId

source§

fn partial_cmp(&self, other: &GlobalReactionId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Copy for GlobalReactionId

source§

impl Eq for GlobalReactionId

source§

impl StructuralEq for GlobalReactionId

source§

impl StructuralPartialEq for GlobalReactionId

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+GlobalReactionId in reactor_rt::assembly - Rust +
pub struct GlobalReactionId(/* private fields */);
Expand description

Global identifier for a reaction.

+

Implementations§

source§

impl GlobalReactionId

source

pub fn new(container: ReactorId, local: LocalReactionId) -> Self

Trait Implementations§

source§

impl Clone for GlobalReactionId

source§

fn clone(&self) -> GlobalReactionId

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for GlobalReactionId

source§

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

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

impl Display for GlobalReactionId

source§

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

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

impl Hash for GlobalReactionId

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for GlobalReactionId

source§

fn cmp(&self, other: &GlobalReactionId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for GlobalReactionId

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for GlobalReactionId

source§

fn partial_cmp(&self, other: &GlobalReactionId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for GlobalReactionId

source§

impl Eq for GlobalReactionId

source§

impl StructuralEq for GlobalReactionId

source§

impl StructuralPartialEq for GlobalReactionId

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
§

impl<Q, K> Comparable<K> for Q
where + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for Twhere - T: Clone,

§

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> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<N> NodeTrait for N
where + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/reactor_rt/assembly/struct.TriggerId.html b/reactor_rt/assembly/struct.TriggerId.html index a9212864..ea743d54 100644 --- a/reactor_rt/assembly/struct.TriggerId.html +++ b/reactor_rt/assembly/struct.TriggerId.html @@ -1,35 +1,43 @@ -TriggerId in reactor_rt::assembly - Rust
pub struct TriggerId(_);
Expand description

The ID of a trigger component.

-

Implementations§

Trait Implementations§

source§

impl Clone for TriggerId

source§

fn clone(&self) -> TriggerId

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for TriggerId

source§

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

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

impl Hash for TriggerId

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Idx for TriggerId

source§

fn from_usize(idx: usize) -> Self

Construct an Index from a usize. This is equivalent to From. Read more
source§

fn index(self) -> usize

Get the underlying index. This is equivalent to Into
source§

impl Ord for TriggerId

source§

fn cmp(&self, other: &TriggerId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<TriggerId> for TriggerId

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<TriggerId> for TriggerId

source§

fn partial_cmp(&self, other: &TriggerId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Copy for TriggerId

source§

impl Eq for TriggerId

source§

impl StructuralEq for TriggerId

source§

impl StructuralPartialEq for TriggerId

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<I, T> IdxSliceIndex<I, T> for Iwhere - I: Idx,

§

type Output = T

§

fn get( +TriggerId in reactor_rt::assembly - Rust +
pub struct TriggerId(/* private fields */);
Expand description

The ID of a trigger component.

+

Implementations§

Trait Implementations§

source§

impl Clone for TriggerId

source§

fn clone(&self) -> TriggerId

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for TriggerId

source§

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

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

impl Hash for TriggerId

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Idx for TriggerId

source§

fn from_usize(idx: usize) -> Self

Construct an Index from a usize. This is equivalent to From. Read more
source§

fn index(self) -> usize

Get the underlying index. This is equivalent to Into
source§

impl Ord for TriggerId

source§

fn cmp(&self, other: &TriggerId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for TriggerId

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for TriggerId

source§

fn partial_cmp(&self, other: &TriggerId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for TriggerId

source§

impl Eq for TriggerId

source§

impl StructuralEq for TriggerId

source§

impl StructuralPartialEq for TriggerId

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
§

impl<Q, K> Comparable<K> for Q
where + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<I, T> IdxSliceIndex<I, T> for I
where + I: Idx,

§

type Output = T

§

fn get( self, - slice: &IndexSlice<I, [T]> -) -> Option<&<I as IdxSliceIndex<I, T>>::Output>

§

fn get_mut( + slice: &IndexSlice<I, [T]> +) -> Option<&<I as IdxSliceIndex<I, T>>::Output>

§

fn get_mut( self, - slice: &mut IndexSlice<I, [T]> -) -> Option<&mut <I as IdxSliceIndex<I, T>>::Output>

§

fn index(self, slice: &IndexSlice<I, [T]>) -> &<I as IdxSliceIndex<I, T>>::Output

§

fn index_mut( + slice: &mut IndexSlice<I, [T]> +) -> Option<&mut <I as IdxSliceIndex<I, T>>::Output>

§

fn index( self, - slice: &mut IndexSlice<I, [T]> -) -> &mut <I as IdxSliceIndex<I, T>>::Output

source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+ slice: &IndexSlice<I, [T]> +) -> &<I as IdxSliceIndex<I, T>>::Output

§

fn index_mut( + self, + slice: &mut IndexSlice<I, [T]> +) -> &mut <I as IdxSliceIndex<I, T>>::Output

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> ToOwned for Twhere - T: Clone,

§

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 Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<N> NodeTrait for N
where + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/reactor_rt/assembly/trait.ReactorInitializer.html b/reactor_rt/assembly/trait.ReactorInitializer.html index 507739aa..1fac51d3 100644 --- a/reactor_rt/assembly/trait.ReactorInitializer.html +++ b/reactor_rt/assembly/trait.ReactorInitializer.html @@ -1,4 +1,5 @@ -ReactorInitializer in reactor_rt::assembly - Rust
pub trait ReactorInitializer: ReactorBehavior {
+ReactorInitializer in reactor_rt::assembly - Rust
+    
pub trait ReactorInitializer: ReactorBehavior {
     type Wrapped;
     type Params;
 
@@ -9,7 +10,7 @@
         args: Self::Params,
         assembler: AssemblyCtx<'_, Self>
     ) -> AssemblyResult<FinishedReactor<'_, Self>>
-       where Self: Sized;
+       where Self: Sized;
 }
Expand description

Wrapper around the user struct for safe dispatch.

Fields are

    @@ -17,15 +18,15 @@
  1. ctor parameters of the reactor, and
  2. every logical action and port declared by the reactor.
-

Required Associated Types§

source

type Wrapped

Type of the user struct, which contains state variables of the reactor. +

Required Associated Types§

source

type Wrapped

Type of the user struct, which contains state variables of the reactor. Used by the runtime to produce debug information.

-
source

type Params

Type of the construction parameters.

-

Required Associated Constants§

source

const MAX_REACTION_ID: LocalReactionId

Exclusive maximum value of the local_rid parameter of [ReactorBehavior.react].

-

Required Methods§

source

type Params

Type of the construction parameters.

+

Required Associated Constants§

source

const MAX_REACTION_ID: LocalReactionId

Exclusive maximum value of the local_rid parameter of [ReactorBehavior.react].

+

Required Methods§

source

fn assemble( args: Self::Params, assembler: AssemblyCtx<'_, Self> -) -> AssemblyResult<FinishedReactor<'_, Self>>where - Self: Sized,

Assemble this reactor. This initializes state variables, +) -> AssemblyResult<FinishedReactor<'_, Self>>

where + Self: Sized,

Assemble this reactor. This initializes state variables, produces internal components, assembles children reactor instances, and declares dependencies between them.

-

Implementors§

\ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/reactor_rt/assembly/type.AssemblyResult.html b/reactor_rt/assembly/type.AssemblyResult.html index 722ba107..ce6d6fdc 100644 --- a/reactor_rt/assembly/type.AssemblyResult.html +++ b/reactor_rt/assembly/type.AssemblyResult.html @@ -1 +1,7 @@ -AssemblyResult in reactor_rt::assembly - Rust

Type Definition reactor_rt::assembly::AssemblyResult

source ·
pub type AssemblyResult<T = ()> = Result<T, AssemblyError>;
\ No newline at end of file +AssemblyResult in reactor_rt::assembly - Rust +
pub type AssemblyResult<T = ()> = Result<T, AssemblyError>;

Aliased Type§

enum AssemblyResult<T = ()> {
+    Ok(T),
+    Err(AssemblyError),
+}

Variants§

§1.0.0

Ok(T)

Contains the success value

+
§1.0.0

Err(AssemblyError)

Contains the error value

+
\ No newline at end of file diff --git a/reactor_rt/enum.Offset.html b/reactor_rt/enum.Offset.html index 2f74cfa0..fa5e0ffb 100644 --- a/reactor_rt/enum.Offset.html +++ b/reactor_rt/enum.Offset.html @@ -1,9 +1,10 @@ -Offset in reactor_rt - Rust

Enum reactor_rt::Offset

source ·
pub enum Offset {
+Offset in reactor_rt - Rust
+    

Enum reactor_rt::Offset

source ·
pub enum Offset {
     After(Duration),
     Asap,
 }
Expand description

An offset from the current event.

-

This is to be used with ReactionCtx::schedule.

-

Variants§

§

After(Duration)

Specify that the trigger will fire at least after +

This is to be used with ReactionCtx::schedule.

+

Variants§

§

After(Duration)

Specify that the trigger will fire at least after the provided duration.

If the duration is zero (eg Asap), it does not mean that the trigger will fire right away. For actions, the @@ -21,21 +22,23 @@ is applied. This is equivalent to

assert_eq!(Asap, After(Duration::ZERO));
-

Trait Implementations§

source§

impl Clone for Offset

source§

fn clone(&self) -> Offset

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Offset

source§

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

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

impl Hash for Offset

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<Offset> for Offset

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Copy for Offset

source§

impl Eq for Offset

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Clone for Offset

source§

fn clone(&self) -> Offset

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Offset

source§

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

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

impl Hash for Offset

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Offset

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for Offset

source§

impl Eq for Offset

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
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for Twhere - T: Clone,

§

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 Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/enum.TimeUnit.html b/reactor_rt/enum.TimeUnit.html index 94350cf3..0154df7f 100644 --- a/reactor_rt/enum.TimeUnit.html +++ b/reactor_rt/enum.TimeUnit.html @@ -1,4 +1,5 @@ -TimeUnit in reactor_rt - Rust

Enum reactor_rt::TimeUnit

source ·
pub enum TimeUnit {
+TimeUnit in reactor_rt - Rust
+    

Enum reactor_rt::TimeUnit

source ·
pub enum TimeUnit {
     NANO,
     MICRO,
     MILLI,
@@ -7,15 +8,15 @@
     HOUR,
     DAY,
 }
Expand description

A unit of time, used in LF.

-

Variants§

§

NANO

§

MICRO

§

MILLI

§

SEC

§

MIN

§

HOUR

§

DAY

Implementations§

source§

impl TimeUnit

source

pub fn to_duration(&self, magnitude: u64) -> Duration

Trait Implementations§

source§

impl Debug for TimeUnit

source§

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

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

impl TryFrom<&str> for TimeUnit

source§

fn try_from(value: &str) -> Result<Self, Self::Error>

This recognizes the same strings as LF

-
§

type Error = ()

The type returned in the event of a conversion error.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+

Variants§

§

NANO

§

MICRO

§

MILLI

§

SEC

§

MIN

§

HOUR

§

DAY

Implementations§

source§

impl TimeUnit

source

pub fn to_duration(&self, magnitude: u64) -> Duration

Trait Implementations§

source§

impl Debug for TimeUnit

source§

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

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

impl TryFrom<&str> for TimeUnit

source§

fn try_from(value: &str) -> Result<Self, Self::Error>

This recognizes the same strings as LF

+
§

type Error = ()

The type returned in the event of a conversion error.

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/fn.try_parse_duration.html b/reactor_rt/fn.try_parse_duration.html index 9f835ea0..782eafb9 100644 --- a/reactor_rt/fn.try_parse_duration.html +++ b/reactor_rt/fn.try_parse_duration.html @@ -1,4 +1,5 @@ -try_parse_duration in reactor_rt - Rust
pub fn try_parse_duration(t: &str) -> Result<Duration, String>
Expand description

Parse a duration from a string. This is used for CLI +try_parse_duration in reactor_rt - Rust

+
pub fn try_parse_duration(t: &str) -> Result<Duration, String>
Expand description

Parse a duration from a string. This is used for CLI parameter parsing in programs generated by LFC, specifically, to parse main parameters with time type, and scheduler options with time type.

@@ -6,17 +7,17 @@

Tests

use reactor_rt::try_parse_duration;
 use std::time::Duration;
 
-assert_eq!(try_parse_duration("3 ms"),   Ok(Duration::from_millis(3)));
-assert_eq!(try_parse_duration("3ms"),    Ok(Duration::from_millis(3)));
-assert_eq!(try_parse_duration("5us"),    Ok(Duration::from_micros(5)));
-assert_eq!(try_parse_duration("30ns"),   Ok(Duration::from_nanos(30)));
-assert_eq!(try_parse_duration("30nsec"), Ok(Duration::from_nanos(30)));
-assert_eq!(try_parse_duration("30secs"), Ok(Duration::from_secs(30)));
+assert_eq!(try_parse_duration("3 ms"),   Ok(Duration::from_millis(3)));
+assert_eq!(try_parse_duration("3ms"),    Ok(Duration::from_millis(3)));
+assert_eq!(try_parse_duration("5us"),    Ok(Duration::from_micros(5)));
+assert_eq!(try_parse_duration("30ns"),   Ok(Duration::from_nanos(30)));
+assert_eq!(try_parse_duration("30nsec"), Ok(Duration::from_nanos(30)));
+assert_eq!(try_parse_duration("30secs"), Ok(Duration::from_secs(30)));
 // unit is not required for zero
-assert_eq!(try_parse_duration("0"), Ok(Duration::from_secs(0)));
+assert_eq!(try_parse_duration("0"), Ok(Duration::from_secs(0)));
 
-assert_eq!(try_parse_duration(""), Err("cannot parse empty string".into()));
-assert_eq!(try_parse_duration("30"), Err("time unit required".into()));
-assert_eq!(try_parse_duration("30000000000000000000000ns"), Err("number too large to fit in target type".into()));
+assert_eq!(try_parse_duration(""), Err("cannot parse empty string".into()));
+assert_eq!(try_parse_duration("30"), Err("time unit required".into()));
+assert_eq!(try_parse_duration("30000000000000000000000ns"), Err("number too large to fit in target type".into()));
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/reactor_rt/index.html b/reactor_rt/index.html index ea4e3ef5..dedb36a2 100644 --- a/reactor_rt/index.html +++ b/reactor_rt/index.html @@ -1,8 +1,10 @@ -reactor_rt - Rust

Crate reactor_rt

source ·
Expand description

The runtime library for reactor programs generated by LFC, +reactor_rt - Rust

+

Crate reactor_rt

source ·
Expand description

The runtime library for reactor programs generated by LFC, the Lingua Franca compiler.

Most of this crate consists of types that are manipulated only by the generated code. User-written Rust code mostly -interacts with the type ReactionCtx, which is the entry +interacts with the type ReactionCtx, which is the entry point for user documentation.

Crate-level features include:

    @@ -26,19 +28,19 @@
  • no-unsafe: disable optimisations that use unsafe code in this runtime. Just provided for comparison, should probably be removed (unsafe code is fine).
-

Modules

  • Module containing the API to initialize a reactor program.
  • The prelude that is imported at the top of reactor files -generated by LFC.

Macros

Modules

  • Module containing the API to initialize a reactor program.
  • The prelude that is imported at the top of reactor files +generated by LFC.

Macros

  • Shorthand for using After together with [delay].
  • Convenient macro to assert equality of the current tag. This is just shorthand for using assert_eq! with the -syntax of tag.
  • Creates a Duration value using the same syntax as in LF.
  • Convenient macro to create a tag. +syntax of [tag].
  • Creates a Duration value using the same syntax as in LF.
  • Convenient macro to create a tag. This is just a shorthand for using the constructor together -with the syntax of delay.

Structs

  • A type that can affect the logical event queue to implement +with the syntax of [delay].

Structs

  • A type that can affect the logical event queue to implement asynchronous physical actions. This is a “link” to the event system, from the outside world.
  • A Duration type to represent a span of time, typically used for system timeouts.
  • The tag of an event.
  • Global identifier for a reaction.
  • A measurement of a monotonically nondecreasing clock. -Opaque and useful only with Duration.
  • ID of a reaction local to its containing reactor.
  • A logical action.
  • Type of the microsteps of an EventTag.
  • A multiport is a vector of independent ports (its channels) +Opaque and useful only with Duration.
  • ID of a reaction local to its containing reactor.
  • A logical action.
  • Type of the microsteps of an EventTag.
  • A multiport is a vector of independent ports (its channels) Multiports have special Lingua Franca syntax, similar to reactor banks.
  • A physical action. Physical actions may only be used with -the API of AsyncCtx. -See ReactionCtx::spawn_physical_thread.
  • A reference to a physical action. This thing is cloneable +the API of AsyncCtx. +See ReactionCtx::spawn_physical_thread.
  • A reference to a physical action. This thing is cloneable and can be sent to async threads. The contained action reference is unique and protected by a lock. All operations on the action are
  • Represents a port, which carries values of type T. @@ -47,11 +49,11 @@ Only the interactions declared at assembly time are allowed.
  • The unique identifier of a reactor instance during execution.
  • Construction parameters for the scheduler.
  • The runtime scheduler.
  • A timer is conceptually a logical action that may re-schedule -itself periodically.

Enums

  • An offset from the current event.
  • A unit of time, used in LF.

Traits

  • Common trait for actions, ports, and timer objects handed +itself periodically.

Enums

  • An offset from the current event.
  • A unit of time, used in LF.

Traits

Functions

Functions

  • Parse a duration from a string. This is used for CLI parameter parsing in programs generated by LFC, specifically, to parse main parameters with time type, and scheduler -options with time type.
\ No newline at end of file +options with time type. \ No newline at end of file diff --git a/reactor_rt/macro.after.html b/reactor_rt/macro.after.html index b48f9b9a..3eb94cf4 100644 --- a/reactor_rt/macro.after.html +++ b/reactor_rt/macro.after.html @@ -1,10 +1,11 @@ -after in reactor_rt - Rust

Macro reactor_rt::after

source ·
macro_rules! after {
+after in reactor_rt - Rust
+    

Macro reactor_rt::after

source ·
macro_rules! after {
     ($amount:tt $unit:tt) => { ... };
-}
Expand description

Shorthand for using After together with delay.

+}
Expand description

Shorthand for using After together with [delay].

use std::time::Duration;
 use reactor_rt::{after, Offset::After};
 
 assert_eq!(after!(10 ns), After(Duration::from_nanos(10)));
 assert_eq!(after!(2 min), After(Duration::from_secs(120)));
-
\ No newline at end of file + \ No newline at end of file diff --git a/reactor_rt/macro.assert_tag_is.html b/reactor_rt/macro.assert_tag_is.html index 1e840db1..44712d73 100644 --- a/reactor_rt/macro.assert_tag_is.html +++ b/reactor_rt/macro.assert_tag_is.html @@ -1,11 +1,12 @@ -assert_tag_is in reactor_rt - Rust
macro_rules! assert_tag_is {
+assert_tag_is in reactor_rt - Rust
+    
macro_rules! assert_tag_is {
     ($ctx:tt, T0) => { ... };
     ($ctx:tt, (T0, $microstep:expr)) => { ... };
     ($ctx:tt, T0 + $amount:tt $unit:ident) => { ... };
     ($ctx:tt, (T0 + $amount:tt $unit:ident, $microstep:expr)) => { ... };
 }
Expand description

Convenient macro to assert equality of the current tag. This is just shorthand for using assert_eq! with the -syntax of tag.

+syntax of [tag].


 assert_tag_is!(ctx, T0 + 20 ms);
@@ -15,4 +16,4 @@
 assert_tag_is!(ctx, (T0, 1));
 assert_tag_is!(ctx, (T0 + 3 sec, 1));
 assert_tag_is!(ctx, (T0 + 3 sec, foo.i));
-
\ No newline at end of file +
\ No newline at end of file diff --git a/reactor_rt/macro.delay.html b/reactor_rt/macro.delay.html index aef07a4e..86f7cbab 100644 --- a/reactor_rt/macro.delay.html +++ b/reactor_rt/macro.delay.html @@ -1,4 +1,5 @@ -delay in reactor_rt - Rust

Macro reactor_rt::delay

source ·
macro_rules! delay {
+delay in reactor_rt - Rust
+    

Macro reactor_rt::delay

source ·
macro_rules! delay {
     (0) => { ... };
     ($amount:tt ns) => { ... };
     ($amount:tt nsec) => { ... };
@@ -48,4 +49,4 @@
 assert_eq!(delay!(2 h), delay!(2 hours));
 assert_eq!(delay!(1 week), delay!(7 days));
 
-
\ No newline at end of file + \ No newline at end of file diff --git a/reactor_rt/macro.tag.html b/reactor_rt/macro.tag.html index 4c24d3ec..f3a5fa5b 100644 --- a/reactor_rt/macro.tag.html +++ b/reactor_rt/macro.tag.html @@ -1,11 +1,12 @@ -tag in reactor_rt - Rust

Macro reactor_rt::tag

source ·
macro_rules! tag {
+tag in reactor_rt - Rust
+    

Macro reactor_rt::tag

source ·
macro_rules! tag {
     (T0) => { ... };
     (T0, $microstep:expr) => { ... };
     (T0 + $amount:tt $unit:ident) => { ... };
     (T0 + $amount:tt $unit:ident, $microstep:expr) => { ... };
-}
Expand description

Convenient macro to create a tag. +}

Expand description

Convenient macro to create a tag. This is just a shorthand for using the constructor together -with the syntax of delay.

+with the syntax of [delay].

use reactor_rt::{tag, delay};
 
@@ -15,4 +16,4 @@
 // with a microstep:
 tag!(T0, 1);
 tag!(T0 + 3 sec, 1);
-
\ No newline at end of file + \ No newline at end of file diff --git a/reactor_rt/ports/struct.Multiport.html b/reactor_rt/ports/struct.Multiport.html index 4765f15e..2ab557b1 100644 --- a/reactor_rt/ports/struct.Multiport.html +++ b/reactor_rt/ports/struct.Multiport.html @@ -1,11 +1,11 @@ - + Redirection -

Redirecting to ../../reactor_rt/prelude/struct.Multiport.html...

- +

Redirecting to ../../reactor_rt/struct.Multiport.html...

+ \ No newline at end of file diff --git a/reactor_rt/ports/struct.Port.html b/reactor_rt/ports/struct.Port.html index 811a544e..47a95863 100644 --- a/reactor_rt/ports/struct.Port.html +++ b/reactor_rt/ports/struct.Port.html @@ -1,11 +1,11 @@ - + Redirection -

Redirecting to ../../reactor_rt/prelude/struct.Port.html...

- +

Redirecting to ../../reactor_rt/struct.Port.html...

+ \ No newline at end of file diff --git a/reactor_rt/prelude/index.html b/reactor_rt/prelude/index.html index fb5badce..3ccee636 100644 --- a/reactor_rt/prelude/index.html +++ b/reactor_rt/prelude/index.html @@ -1,22 +1,12 @@ -reactor_rt::prelude - Rust

Module reactor_rt::prelude

source ·
Expand description

The prelude that is imported at the top of reactor files +reactor_rt::prelude - Rust

+

Module reactor_rt::prelude

source ·
Expand description

The prelude that is imported at the top of reactor files generated by LFC.

-

Re-exports

Macros

Re-exports

Macros

  • Shorthand for using After together with [delay].
  • Convenient macro to assert equality of the current tag. This is just shorthand for using assert_eq! with the -syntax of tag.
  • Creates a Duration value using the same syntax as in LF.
  • Convenient macro to create a tag. +syntax of [tag].
  • Creates a Duration value using the same syntax as in LF.
  • Convenient macro to create a tag. This is just a shorthand for using the constructor together -with the syntax of delay.

Structs

  • A type that can affect the logical event queue to implement -asynchronous physical actions. This is a “link” to the event -system, from the outside world.
  • A Duration type to represent a span of time, typically used for system -timeouts.
  • The tag of an event.
  • A measurement of a monotonically nondecreasing clock. -Opaque and useful only with Duration.
  • A logical action.
  • A multiport is a vector of independent ports (its channels) -Multiports have special Lingua Franca syntax, similar to reactor banks.
  • A reference to a physical action. This thing is cloneable -and can be sent to async threads. The contained action -reference is unique and protected by a lock. All operations -on the action are
  • Represents a port, which carries values of type T. -Ports reify the data inputs and outputs of a reactor.
  • The context in which a reaction executes. Its API -allows mutating the event queue of the scheduler. -Only the interactions declared at assembly time -are allowed.
  • A timer is conceptually a logical action that may re-schedule -itself periodically.

Type Definitions

  • Alias for the unit type, so that it can be written without quotes in LF. +with the syntax of [delay].

Structs

  • A Duration type to represent a span of time, typically used for system +timeouts.
  • A measurement of a monotonically nondecreasing clock. +Opaque and useful only with Duration.

Type Aliases

  • Alias for the unit type, so that it can be written without quotes in LF. Otherwise it needs to be written {= () =}. -It is not camel-case as it is actually a primitive type.
\ No newline at end of file +It is not camel-case as it is actually a primitive type. \ No newline at end of file diff --git a/reactor_rt/prelude/macro.after.html b/reactor_rt/prelude/macro.after.html index 679bd057..0c9e1773 100644 --- a/reactor_rt/prelude/macro.after.html +++ b/reactor_rt/prelude/macro.after.html @@ -1,10 +1,11 @@ -after in reactor_rt::prelude - Rust

Macro reactor_rt::prelude::after

source ·
macro_rules! after {
+after in reactor_rt::prelude - Rust
+    

Macro reactor_rt::prelude::after

source ·
macro_rules! after {
     ($amount:tt $unit:tt) => { ... };
-}
Expand description

Shorthand for using After together with delay.

+}
Expand description

Shorthand for using After together with [delay].

use std::time::Duration;
 use reactor_rt::{after, Offset::After};
 
 assert_eq!(after!(10 ns), After(Duration::from_nanos(10)));
 assert_eq!(after!(2 min), After(Duration::from_secs(120)));
-
\ No newline at end of file + \ No newline at end of file diff --git a/reactor_rt/prelude/macro.assert_tag_is.html b/reactor_rt/prelude/macro.assert_tag_is.html index 2b6b4ebe..c059ed86 100644 --- a/reactor_rt/prelude/macro.assert_tag_is.html +++ b/reactor_rt/prelude/macro.assert_tag_is.html @@ -1,11 +1,12 @@ -assert_tag_is in reactor_rt::prelude - Rust
macro_rules! assert_tag_is {
+assert_tag_is in reactor_rt::prelude - Rust
+    
macro_rules! assert_tag_is {
     ($ctx:tt, T0) => { ... };
     ($ctx:tt, (T0, $microstep:expr)) => { ... };
     ($ctx:tt, T0 + $amount:tt $unit:ident) => { ... };
     ($ctx:tt, (T0 + $amount:tt $unit:ident, $microstep:expr)) => { ... };
 }
Expand description

Convenient macro to assert equality of the current tag. This is just shorthand for using assert_eq! with the -syntax of tag.

+syntax of [tag].


 assert_tag_is!(ctx, T0 + 20 ms);
@@ -15,4 +16,4 @@
 assert_tag_is!(ctx, (T0, 1));
 assert_tag_is!(ctx, (T0 + 3 sec, 1));
 assert_tag_is!(ctx, (T0 + 3 sec, foo.i));
-
\ No newline at end of file +
\ No newline at end of file diff --git a/reactor_rt/prelude/macro.delay.html b/reactor_rt/prelude/macro.delay.html index d8b4a21e..f4701b53 100644 --- a/reactor_rt/prelude/macro.delay.html +++ b/reactor_rt/prelude/macro.delay.html @@ -1,4 +1,5 @@ -delay in reactor_rt::prelude - Rust

Macro reactor_rt::prelude::delay

source ·
macro_rules! delay {
+delay in reactor_rt::prelude - Rust
+    

Macro reactor_rt::prelude::delay

source ·
macro_rules! delay {
     (0) => { ... };
     ($amount:tt ns) => { ... };
     ($amount:tt nsec) => { ... };
@@ -48,4 +49,4 @@
 assert_eq!(delay!(2 h), delay!(2 hours));
 assert_eq!(delay!(1 week), delay!(7 days));
 
-
\ No newline at end of file + \ No newline at end of file diff --git a/reactor_rt/prelude/macro.tag.html b/reactor_rt/prelude/macro.tag.html index dcc5b0e1..dbc0ee70 100644 --- a/reactor_rt/prelude/macro.tag.html +++ b/reactor_rt/prelude/macro.tag.html @@ -1,11 +1,12 @@ -tag in reactor_rt::prelude - Rust

Macro reactor_rt::prelude::tag

source ·
macro_rules! tag {
+tag in reactor_rt::prelude - Rust
+    

Macro reactor_rt::prelude::tag

source ·
macro_rules! tag {
     (T0) => { ... };
     (T0, $microstep:expr) => { ... };
     (T0 + $amount:tt $unit:ident) => { ... };
     (T0 + $amount:tt $unit:ident, $microstep:expr) => { ... };
-}
Expand description

Convenient macro to create a tag. +}

Expand description

Convenient macro to create a tag. This is just a shorthand for using the constructor together -with the syntax of delay.

+with the syntax of [delay].

use reactor_rt::{tag, delay};
 
@@ -15,4 +16,4 @@
 // with a microstep:
 tag!(T0, 1);
 tag!(T0 + 3 sec, 1);
-
\ No newline at end of file + \ No newline at end of file diff --git a/reactor_rt/prelude/sidebar-items.js b/reactor_rt/prelude/sidebar-items.js index cf2bc8b2..4aea0b57 100644 --- a/reactor_rt/prelude/sidebar-items.js +++ b/reactor_rt/prelude/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"macro":["after","assert_tag_is","delay","tag"],"struct":["AsyncCtx","Duration","EventTag","Instant","LogicalAction","Multiport","PhysicalActionRef","Port","ReactionCtx","Timer"],"type":["unit"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"macro":["after","assert_tag_is","delay","tag"],"struct":["Duration","Instant"],"type":["unit"]}; \ No newline at end of file diff --git a/reactor_rt/prelude/struct.AsyncCtx.html b/reactor_rt/prelude/struct.AsyncCtx.html deleted file mode 100644 index 7ff2609a..00000000 --- a/reactor_rt/prelude/struct.AsyncCtx.html +++ /dev/null @@ -1,56 +0,0 @@ -AsyncCtx in reactor_rt::prelude - Rust
pub struct AsyncCtx { /* private fields */ }
Expand description

A type that can affect the logical event queue to implement -asynchronous physical actions. This is a “link” to the event -system, from the outside world.

-

See ReactionCtx::spawn_physical_thread.

-

Implementations§

source§

impl AsyncCtx

source

pub fn was_terminated(&self) -> bool

Returns true if the scheduler has been shutdown. When -that’s true, calls to other methods of this type will -fail with [SendError].

-
source

pub fn request_stop(&mut self, offset: Offset) -> Result<(), SendError<()>>

Request that the application shutdown, possibly with -a particular offset from the current physical time.

-

This may fail if this is called while the scheduler -has already been shutdown. An Ok result is also not -a guarantee that the event will be processed: the -scheduler may be in the process of shutting down, -or its shutdown might be programmed for a logical -time which precedes the current physical time.

-
source

pub fn schedule_physical<T: Sync>( - &mut self, - action: &PhysicalActionRef<T>, - offset: Offset -) -> Result<(), SendError<Option<T>>>

Schedule an action to run after its own implicit time delay -plus an optional additional time delay. These delays are in -logical time.

-

Note that this locks the action.

-

This may fail if this is called while the scheduler -has already been shutdown. An Ok result is also not -a guarantee that the event will be processed: the -scheduler may be in the process of shutting down, -or its shutdown might be programmed for a logical -time which precedes the current physical time.

-
source

pub fn schedule_physical_with_v<T: Sync>( - &mut self, - action: &PhysicalActionRef<T>, - value: Option<T>, - offset: Offset -) -> Result<(), SendError<Option<T>>>

Schedule an action to run after its own implicit time delay -plus an optional additional time delay. These delays are in -logical time.

-

Note that this locks the action.

-

This may fail if this is called while the scheduler -has already been shutdown. An Ok result is also not -a guarantee that the event will be processed: the -scheduler may be in the process of shutting down, -or its shutdown might be programmed for a logical -time which precedes the current physical time.

-

Trait Implementations§

source§

impl Clone for AsyncCtx

source§

fn clone(&self) -> AsyncCtx

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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> ToOwned for Twhere - T: Clone,

§

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 Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file diff --git a/reactor_rt/prelude/struct.Duration.html b/reactor_rt/prelude/struct.Duration.html index ab17a251..0508f066 100644 --- a/reactor_rt/prelude/struct.Duration.html +++ b/reactor_rt/prelude/struct.Duration.html @@ -1,11 +1,12 @@ -Duration in reactor_rt::prelude - Rust

Struct reactor_rt::prelude::Duration

1.3.0 · source ·
pub struct Duration { /* private fields */ }
Expand description

A Duration type to represent a span of time, typically used for system +Duration in reactor_rt::prelude - Rust

+

Struct reactor_rt::prelude::Duration

1.3.0 · source ·
pub struct Duration { /* private fields */ }
Expand description

A Duration type to represent a span of time, typically used for system timeouts.

Each Duration is composed of a whole number of seconds and a fractional part represented in nanoseconds. If the underlying system does not support nanosecond-level precision, APIs binding a system timeout will typically round up the number of nanoseconds.

-

Durations implement many common traits, including Add, Sub, and other -ops traits. It implements Default by returning a zero-length Duration.

+

Durations implement many common traits, including Add, Sub, and other +ops traits. It implements Default by returning a zero-length Duration.

Examples

Implementations§

source§

impl Duration

source

pub const SECOND: Duration = Duration::from_secs(1)

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one second.

+

Implementations§

source§

impl Duration

source

pub const SECOND: Duration = _

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one second.

Examples
#![feature(duration_constants)]
 use std::time::Duration;
 
 assert_eq!(Duration::SECOND, Duration::from_secs(1));
-
source

pub const MILLISECOND: Duration = Duration::from_millis(1)

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one millisecond.

+
source

pub const MILLISECOND: Duration = _

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one millisecond.

Examples
#![feature(duration_constants)]
 use std::time::Duration;
 
 assert_eq!(Duration::MILLISECOND, Duration::from_millis(1));
-
source

pub const MICROSECOND: Duration = Duration::from_micros(1)

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one microsecond.

+
source

pub const MICROSECOND: Duration = _

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one microsecond.

Examples
#![feature(duration_constants)]
 use std::time::Duration;
 
 assert_eq!(Duration::MICROSECOND, Duration::from_micros(1));
-
source

pub const NANOSECOND: Duration = Duration::from_nanos(1)

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one nanosecond.

+
source

pub const NANOSECOND: Duration = _

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one nanosecond.

Examples
#![feature(duration_constants)]
 use std::time::Duration;
 
 assert_eq!(Duration::NANOSECOND, Duration::from_nanos(1));
-
1.53.0 · source

pub const ZERO: Duration = Duration::from_nanos(0)

A duration of zero time.

+
1.53.0 · source

pub const ZERO: Duration = _

A duration of zero time.

Examples
use std::time::Duration;
 
 let duration = Duration::ZERO;
 assert!(duration.is_zero());
 assert_eq!(duration.as_nanos(), 0);
-
1.53.0 · source

pub const MAX: Duration = Duration::new(u64::MAX, NANOS_PER_SEC - 1)

The maximum duration.

+
1.53.0 · source

pub const MAX: Duration = _

The maximum duration.

May vary by platform as necessary. Must be able to contain the difference between two instances of Instant or two instances of SystemTime. This constraint gives it a value of about 584,942,417,355 years in practice, @@ -64,7 +65,7 @@

Examples
use std::time::Duration;
 
 assert_eq!(Duration::MAX, Duration::new(u64::MAX, 1_000_000_000 - 1));
-
const: 1.58.0 · source

pub const fn new(secs: u64, nanos: u32) -> Duration

Creates a new Duration from the specified number of whole seconds and +

const: 1.58.0 · source

pub const fn new(secs: u64, nanos: u32) -> Duration

Creates a new Duration from the specified number of whole seconds and additional nanoseconds.

If the number of nanoseconds is greater than 1 billion (the number of nanoseconds in a second), then it will carry over into the seconds provided.

@@ -75,7 +76,7 @@
Examples
use std::time::Duration;
 
 let five_seconds = Duration::new(5, 0);
-
const: 1.32.0 · source

pub const fn from_secs(secs: u64) -> Duration

Creates a new Duration from the specified number of whole seconds.

+
const: 1.32.0 · source

pub const fn from_secs(secs: u64) -> Duration

Creates a new Duration from the specified number of whole seconds.

Examples
use std::time::Duration;
 
@@ -83,7 +84,7 @@ 
Examples
assert_eq!(5, duration.as_secs()); assert_eq!(0, duration.subsec_nanos());
-
const: 1.32.0 · source

pub const fn from_millis(millis: u64) -> Duration

Creates a new Duration from the specified number of milliseconds.

+
const: 1.32.0 · source

pub const fn from_millis(millis: u64) -> Duration

Creates a new Duration from the specified number of milliseconds.

Examples
use std::time::Duration;
 
@@ -91,7 +92,7 @@ 
Examples
assert_eq!(2, duration.as_secs()); assert_eq!(569_000_000, duration.subsec_nanos());
-
1.27.0 (const: 1.32.0) · source

pub const fn from_micros(micros: u64) -> Duration

Creates a new Duration from the specified number of microseconds.

+
1.27.0 (const: 1.32.0) · source

pub const fn from_micros(micros: u64) -> Duration

Creates a new Duration from the specified number of microseconds.

Examples
use std::time::Duration;
 
@@ -99,7 +100,7 @@ 
Examples
assert_eq!(1, duration.as_secs()); assert_eq!(2000, duration.subsec_nanos());
-
1.27.0 (const: 1.32.0) · source

pub const fn from_nanos(nanos: u64) -> Duration

Creates a new Duration from the specified number of nanoseconds.

+
1.27.0 (const: 1.32.0) · source

pub const fn from_nanos(nanos: u64) -> Duration

Creates a new Duration from the specified number of nanoseconds.

Examples
use std::time::Duration;
 
@@ -107,7 +108,7 @@ 
Examples
assert_eq!(1, duration.as_secs()); assert_eq!(123, duration.subsec_nanos());
-
1.53.0 (const: 1.53.0) · source

pub const fn is_zero(&self) -> bool

Returns true if this Duration spans no time.

+
1.53.0 (const: 1.53.0) · source

pub const fn is_zero(&self) -> bool

Returns true if this Duration spans no time.

Examples
use std::time::Duration;
 
@@ -119,7 +120,7 @@ 
Examples
assert!(!Duration::new(1, 1).is_zero()); assert!(!Duration::from_nanos(1).is_zero()); assert!(!Duration::from_secs(1).is_zero());
-
const: 1.32.0 · source

pub const fn as_secs(&self) -> u64

Returns the number of whole seconds contained by this Duration.

+
const: 1.32.0 · source

pub const fn as_secs(&self) -> u64

Returns the number of whole seconds contained by this Duration.

The returned value does not include the fractional (nanosecond) part of the duration, which can be obtained using subsec_nanos.

Examples
@@ -129,7 +130,7 @@
Examples
assert_eq!(duration.as_secs(), 5);

To determine the total number of seconds represented by the Duration including the fractional part, use as_secs_f64 or as_secs_f32

-
1.27.0 (const: 1.32.0) · source

pub const fn subsec_millis(&self) -> u32

Returns the fractional part of this Duration, in whole milliseconds.

+
1.27.0 (const: 1.32.0) · source

pub const fn subsec_millis(&self) -> u32

Returns the fractional part of this Duration, in whole milliseconds.

This method does not return the length of the duration when represented by milliseconds. The returned number always represents a fractional portion of a second (i.e., it is less than one thousand).

@@ -139,7 +140,7 @@
Examples
let duration = Duration::from_millis(5432); assert_eq!(duration.as_secs(), 5); assert_eq!(duration.subsec_millis(), 432);
-
1.27.0 (const: 1.32.0) · source

pub const fn subsec_micros(&self) -> u32

Returns the fractional part of this Duration, in whole microseconds.

+
1.27.0 (const: 1.32.0) · source

pub const fn subsec_micros(&self) -> u32

Returns the fractional part of this Duration, in whole microseconds.

This method does not return the length of the duration when represented by microseconds. The returned number always represents a fractional portion of a second (i.e., it is less than one million).

@@ -149,7 +150,7 @@
Examples
let duration = Duration::from_micros(1_234_567); assert_eq!(duration.as_secs(), 1); assert_eq!(duration.subsec_micros(), 234_567);
-
const: 1.32.0 · source

pub const fn subsec_nanos(&self) -> u32

Returns the fractional part of this Duration, in nanoseconds.

+
const: 1.32.0 · source

pub const fn subsec_nanos(&self) -> u32

Returns the fractional part of this Duration, in nanoseconds.

This method does not return the length of the duration when represented by nanoseconds. The returned number always represents a fractional portion of a second (i.e., it is less than one billion).

@@ -159,77 +160,86 @@
Examples
let duration = Duration::from_millis(5010); assert_eq!(duration.as_secs(), 5); assert_eq!(duration.subsec_nanos(), 10_000_000);
-
1.33.0 (const: 1.33.0) · source

pub const fn as_millis(&self) -> u128

Returns the total number of whole milliseconds contained by this Duration.

+
1.33.0 (const: 1.33.0) · source

pub const fn as_millis(&self) -> u128

Returns the total number of whole milliseconds contained by this Duration.

Examples
use std::time::Duration;
 
 let duration = Duration::new(5, 730023852);
 assert_eq!(duration.as_millis(), 5730);
-
1.33.0 (const: 1.33.0) · source

pub const fn as_micros(&self) -> u128

Returns the total number of whole microseconds contained by this Duration.

+
1.33.0 (const: 1.33.0) · source

pub const fn as_micros(&self) -> u128

Returns the total number of whole microseconds contained by this Duration.

Examples
use std::time::Duration;
 
 let duration = Duration::new(5, 730023852);
 assert_eq!(duration.as_micros(), 5730023);
-
1.33.0 (const: 1.33.0) · source

pub const fn as_nanos(&self) -> u128

Returns the total number of nanoseconds contained by this Duration.

+
1.33.0 (const: 1.33.0) · source

pub const fn as_nanos(&self) -> u128

Returns the total number of nanoseconds contained by this Duration.

Examples
use std::time::Duration;
 
 let duration = Duration::new(5, 730023852);
 assert_eq!(duration.as_nanos(), 5730023852);
-
1.16.0 (const: 1.58.0) · source

pub const fn checked_add(self, rhs: Duration) -> Option<Duration>

Checked Duration addition. Computes self + other, returning None -if overflow occurred.

+
source

pub const fn abs_diff(self, other: Duration) -> Duration

🔬This is a nightly-only experimental API. (duration_abs_diff)

Computes the absolute difference between self and other.

Examples

Basic usage:

+
#![feature(duration_abs_diff)]
+use std::time::Duration;
+
+assert_eq!(Duration::new(100, 0).abs_diff(Duration::new(80, 0)), Duration::new(20, 0));
+assert_eq!(Duration::new(100, 400_000_000).abs_diff(Duration::new(110, 0)), Duration::new(9, 600_000_000));
+
1.16.0 (const: 1.58.0) · source

pub const fn checked_add(self, rhs: Duration) -> Option<Duration>

Checked Duration addition. Computes self + other, returning None +if overflow occurred.

+
Examples
+

Basic usage:

+
use std::time::Duration;
 
 assert_eq!(Duration::new(0, 0).checked_add(Duration::new(0, 1)), Some(Duration::new(0, 1)));
 assert_eq!(Duration::new(1, 0).checked_add(Duration::new(u64::MAX, 0)), None);
-
1.53.0 (const: 1.58.0) · source

pub const fn saturating_add(self, rhs: Duration) -> Duration

Saturating Duration addition. Computes self + other, returning Duration::MAX +

1.53.0 (const: 1.58.0) · source

pub const fn saturating_add(self, rhs: Duration) -> Duration

Saturating Duration addition. Computes self + other, returning Duration::MAX if overflow occurred.

-
Examples
+
Examples
#![feature(duration_constants)]
 use std::time::Duration;
 
 assert_eq!(Duration::new(0, 0).saturating_add(Duration::new(0, 1)), Duration::new(0, 1));
 assert_eq!(Duration::new(1, 0).saturating_add(Duration::new(u64::MAX, 0)), Duration::MAX);
-
1.16.0 (const: 1.58.0) · source

pub const fn checked_sub(self, rhs: Duration) -> Option<Duration>

Checked Duration subtraction. Computes self - other, returning None +

1.16.0 (const: 1.58.0) · source

pub const fn checked_sub(self, rhs: Duration) -> Option<Duration>

Checked Duration subtraction. Computes self - other, returning None if the result would be negative or if overflow occurred.

-
Examples
+
Examples

Basic usage:

use std::time::Duration;
 
 assert_eq!(Duration::new(0, 1).checked_sub(Duration::new(0, 0)), Some(Duration::new(0, 1)));
 assert_eq!(Duration::new(0, 0).checked_sub(Duration::new(0, 1)), None);
-
1.53.0 (const: 1.58.0) · source

pub const fn saturating_sub(self, rhs: Duration) -> Duration

Saturating Duration subtraction. Computes self - other, returning Duration::ZERO +

1.53.0 (const: 1.58.0) · source

pub const fn saturating_sub(self, rhs: Duration) -> Duration

Saturating Duration subtraction. Computes self - other, returning Duration::ZERO if the result would be negative or if overflow occurred.

-
Examples
+
Examples
use std::time::Duration;
 
 assert_eq!(Duration::new(0, 1).saturating_sub(Duration::new(0, 0)), Duration::new(0, 1));
 assert_eq!(Duration::new(0, 0).saturating_sub(Duration::new(0, 1)), Duration::ZERO);
-
1.16.0 (const: 1.58.0) · source

pub const fn checked_mul(self, rhs: u32) -> Option<Duration>

Checked Duration multiplication. Computes self * other, returning -None if overflow occurred.

-
Examples
+
1.16.0 (const: 1.58.0) · source

pub const fn checked_mul(self, rhs: u32) -> Option<Duration>

Checked Duration multiplication. Computes self * other, returning +None if overflow occurred.

+
Examples

Basic usage:

use std::time::Duration;
 
 assert_eq!(Duration::new(0, 500_000_001).checked_mul(2), Some(Duration::new(1, 2)));
 assert_eq!(Duration::new(u64::MAX - 1, 0).checked_mul(2), None);
-
1.53.0 (const: 1.58.0) · source

pub const fn saturating_mul(self, rhs: u32) -> Duration

Saturating Duration multiplication. Computes self * other, returning +

1.53.0 (const: 1.58.0) · source

pub const fn saturating_mul(self, rhs: u32) -> Duration

Saturating Duration multiplication. Computes self * other, returning Duration::MAX if overflow occurred.

-
Examples
+
Examples
#![feature(duration_constants)]
 use std::time::Duration;
 
 assert_eq!(Duration::new(0, 500_000_001).saturating_mul(2), Duration::new(1, 2));
 assert_eq!(Duration::new(u64::MAX - 1, 0).saturating_mul(2), Duration::MAX);
-
1.16.0 (const: 1.58.0) · source

pub const fn checked_div(self, rhs: u32) -> Option<Duration>

Checked Duration division. Computes self / other, returning None +

1.16.0 (const: 1.58.0) · source

pub const fn checked_div(self, rhs: u32) -> Option<Duration>

Checked Duration division. Computes self / other, returning None if other == 0.

-
Examples
+
Examples

Basic usage:

use std::time::Duration;
@@ -237,25 +247,25 @@ 
Examples
assert_eq!(Duration::new(2, 0).checked_div(2), Some(Duration::new(1, 0))); assert_eq!(Duration::new(1, 0).checked_div(2), Some(Duration::new(0, 500_000_000))); assert_eq!(Duration::new(2, 0).checked_div(0), None);
-
1.38.0 (const: unstable) · source

pub fn as_secs_f64(&self) -> f64

Returns the number of seconds contained by this Duration as f64.

+
1.38.0 (const: unstable) · source

pub fn as_secs_f64(&self) -> f64

Returns the number of seconds contained by this Duration as f64.

The returned value does include the fractional (nanosecond) part of the duration.

-
Examples
+
Examples
use std::time::Duration;
 
 let dur = Duration::new(2, 700_000_000);
 assert_eq!(dur.as_secs_f64(), 2.7);
-
1.38.0 (const: unstable) · source

pub fn as_secs_f32(&self) -> f32

Returns the number of seconds contained by this Duration as f32.

+
1.38.0 (const: unstable) · source

pub fn as_secs_f32(&self) -> f32

Returns the number of seconds contained by this Duration as f32.

The returned value does include the fractional (nanosecond) part of the duration.

-
Examples
+
Examples
use std::time::Duration;
 
 let dur = Duration::new(2, 700_000_000);
 assert_eq!(dur.as_secs_f32(), 2.7);
-
1.38.0 (const: unstable) · source

pub fn from_secs_f64(secs: f64) -> Duration

Creates a new Duration from the specified number of seconds represented +

1.38.0 · source

pub fn from_secs_f64(secs: f64) -> Duration

Creates a new Duration from the specified number of seconds represented as f64.

Panics

This constructor will panic if secs is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let res = Duration::from_secs_f64(0.0);
@@ -274,11 +284,11 @@ 
Examples
// conversion uses rounding let res = Duration::from_secs_f64(0.999e-9); assert_eq!(res, Duration::new(0, 1));
-
1.38.0 (const: unstable) · source

pub fn from_secs_f32(secs: f32) -> Duration

Creates a new Duration from the specified number of seconds represented +

1.38.0 · source

pub fn from_secs_f32(secs: f32) -> Duration

Creates a new Duration from the specified number of seconds represented as f32.

Panics

This constructor will panic if secs is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let res = Duration::from_secs_f32(0.0);
@@ -297,37 +307,37 @@ 
Examples
// conversion uses rounding let res = Duration::from_secs_f32(0.999e-9); assert_eq!(res, Duration::new(0, 1));
-
1.38.0 (const: unstable) · source

pub fn mul_f64(self, rhs: f64) -> Duration

Multiplies Duration by f64.

+
1.38.0 · source

pub fn mul_f64(self, rhs: f64) -> Duration

Multiplies Duration by f64.

Panics

This method will panic if result is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let dur = Duration::new(2, 700_000_000);
 assert_eq!(dur.mul_f64(3.14), Duration::new(8, 478_000_000));
 assert_eq!(dur.mul_f64(3.14e5), Duration::new(847_800, 0));
-
1.38.0 (const: unstable) · source

pub fn mul_f32(self, rhs: f32) -> Duration

Multiplies Duration by f32.

+
1.38.0 · source

pub fn mul_f32(self, rhs: f32) -> Duration

Multiplies Duration by f32.

Panics

This method will panic if result is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let dur = Duration::new(2, 700_000_000);
 assert_eq!(dur.mul_f32(3.14), Duration::new(8, 478_000_641));
 assert_eq!(dur.mul_f32(3.14e5), Duration::new(847800, 0));
-
1.38.0 (const: unstable) · source

pub fn div_f64(self, rhs: f64) -> Duration

Divide Duration by f64.

+
1.38.0 · source

pub fn div_f64(self, rhs: f64) -> Duration

Divide Duration by f64.

Panics

This method will panic if result is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let dur = Duration::new(2, 700_000_000);
 assert_eq!(dur.div_f64(3.14), Duration::new(0, 859_872_611));
 assert_eq!(dur.div_f64(3.14e5), Duration::new(0, 8_599));
-
1.38.0 (const: unstable) · source

pub fn div_f32(self, rhs: f32) -> Duration

Divide Duration by f32.

+
1.38.0 · source

pub fn div_f32(self, rhs: f32) -> Duration

Divide Duration by f32.

Panics

This method will panic if result is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let dur = Duration::new(2, 700_000_000);
@@ -335,25 +345,25 @@ 
Examples
// different from 0.859_872_611 assert_eq!(dur.div_f32(3.14), Duration::new(0, 859_872_580)); assert_eq!(dur.div_f32(3.14e5), Duration::new(0, 8_599));
-
const: unstable · source

pub fn div_duration_f64(self, rhs: Duration) -> f64

🔬This is a nightly-only experimental API. (div_duration)

Divide Duration by Duration and return f64.

-
Examples
+
const: unstable · source

pub fn div_duration_f64(self, rhs: Duration) -> f64

🔬This is a nightly-only experimental API. (div_duration)

Divide Duration by Duration and return f64.

+
Examples
#![feature(div_duration)]
 use std::time::Duration;
 
 let dur1 = Duration::new(2, 700_000_000);
 let dur2 = Duration::new(5, 400_000_000);
 assert_eq!(dur1.div_duration_f64(dur2), 0.5);
-
const: unstable · source

pub fn div_duration_f32(self, rhs: Duration) -> f32

🔬This is a nightly-only experimental API. (div_duration)

Divide Duration by Duration and return f32.

-
Examples
+
const: unstable · source

pub fn div_duration_f32(self, rhs: Duration) -> f32

🔬This is a nightly-only experimental API. (div_duration)

Divide Duration by Duration and return f32.

+
Examples
#![feature(div_duration)]
 use std::time::Duration;
 
 let dur1 = Duration::new(2, 700_000_000);
 let dur2 = Duration::new(5, 400_000_000);
 assert_eq!(dur1.div_duration_f32(dur2), 0.5);
-
source§

impl Duration

1.66.0 (const: unstable) · source

pub fn try_from_secs_f32(secs: f32) -> Result<Duration, TryFromFloatSecsError>

The checked version of from_secs_f32.

+
source§

impl Duration

1.66.0 · source

pub fn try_from_secs_f32(secs: f32) -> Result<Duration, TryFromFloatSecsError>

The checked version of from_secs_f32.

This constructor will return an Err if secs is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let res = Duration::try_from_secs_f32(0.0);
@@ -400,9 +410,9 @@ 
Examples
let val = f32::from_bits(0x3F806000); let res = Duration::try_from_secs_f32(val); assert_eq!(res, Ok(Duration::new(1, 2_929_688)));
-
1.66.0 (const: unstable) · source

pub fn try_from_secs_f64(secs: f64) -> Result<Duration, TryFromFloatSecsError>

The checked version of from_secs_f64.

+
1.66.0 · source

pub fn try_from_secs_f64(secs: f64) -> Result<Duration, TryFromFloatSecsError>

The checked version of from_secs_f64.

This constructor will return an Err if secs is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let res = Duration::try_from_secs_f64(0.0);
@@ -457,36 +467,40 @@ 
Examples
let val = f64::from_bits(0x3_FF00_C000_0000_000); let res = Duration::try_from_secs_f64(val); assert_eq!(res, Ok(Duration::new(1, 2_929_688)));
-

Trait Implementations§

source§

impl Add<Duration> for Duration

§

type Output = Duration

The resulting type after applying the + operator.
source§

fn add(self, rhs: Duration) -> Duration

Performs the + operation. Read more
1.8.0 · source§

impl Add<Duration> for Instant

source§

fn add(self, other: Duration) -> Instant

Trait Implementations§

1.8.0 · source§

impl Add<Duration> for Instant

source§

fn add(self, other: Duration) -> Instant

Panics

This function may panic if the resulting point in time cannot be represented by the underlying data structure. See Instant::checked_add for a version without panic.

-
§

type Output = Instant

The resulting type after applying the + operator.
1.9.0 · source§

impl AddAssign<Duration> for Duration

source§

fn add_assign(&mut self, rhs: Duration)

Performs the += operation. Read more
1.9.0 · source§

impl AddAssign<Duration> for Instant

source§

fn add_assign(&mut self, other: Duration)

Performs the += operation. Read more
source§

impl Clone for Duration

source§

fn clone(&self) -> Duration

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
1.27.0 · source§

impl Debug for Duration

source§

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

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

impl Default for Duration

source§

fn default() -> Duration

Returns the “default value” for a type. Read more
source§

impl Div<u32> for Duration

§

type Output = Duration

The resulting type after applying the / operator.
source§

fn div(self, rhs: u32) -> Duration

Performs the / operation. Read more
1.9.0 · source§

impl DivAssign<u32> for Duration

source§

fn div_assign(&mut self, rhs: u32)

Performs the /= operation. Read more
source§

impl Hash for Duration

source§

fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

Feeds this value into the given Hasher. Read more
source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Mul<u32> for Duration

§

type Output = Duration

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u32) -> Duration

Performs the * operation. Read more
1.9.0 · source§

impl MulAssign<u32> for Duration

source§

fn mul_assign(&mut self, rhs: u32)

Performs the *= operation. Read more
source§

impl Ord for Duration

source§

fn cmp(&self, other: &Duration) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Duration> for Duration

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Duration> for Duration

source§

fn partial_cmp(&self, other: &Duration) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Sub<Duration> for Duration

§

type Output = Duration

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Duration) -> Duration

Performs the - operation. Read more
1.8.0 · source§

impl Sub<Duration> for Instant

§

type Output = Instant

The resulting type after applying the - operator.
source§

fn sub(self, other: Duration) -> Instant

Performs the - operation. Read more
1.9.0 · source§

impl SubAssign<Duration> for Duration

source§

fn sub_assign(&mut self, rhs: Duration)

Performs the -= operation. Read more
1.9.0 · source§

impl SubAssign<Duration> for Instant

source§

fn sub_assign(&mut self, other: Duration)

Performs the -= operation. Read more
1.16.0 · source§

impl<'a> Sum<&'a Duration> for Duration

source§

fn sum<I>(iter: I) -> Durationwhere - I: Iterator<Item = &'a Duration>,

Method which takes an iterator and generates Self from the elements by -“summing up” the items.
1.16.0 · source§

impl Sum<Duration> for Duration

source§

fn sum<I>(iter: I) -> Durationwhere - I: Iterator<Item = Duration>,

Method which takes an iterator and generates Self from the elements by -“summing up” the items.
source§

impl Copy for Duration

source§

impl Eq for Duration

source§

impl StructuralEq for Duration

source§

impl StructuralPartialEq for Duration

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+
§

type Output = Instant

The resulting type after applying the + operator.
source§

impl Add for Duration

§

type Output = Duration

The resulting type after applying the + operator.
source§

fn add(self, rhs: Duration) -> Duration

Performs the + operation. Read more
1.9.0 · source§

impl AddAssign<Duration> for Instant

source§

fn add_assign(&mut self, other: Duration)

Performs the += operation. Read more
1.9.0 · source§

impl AddAssign for Duration

source§

fn add_assign(&mut self, rhs: Duration)

Performs the += operation. Read more
source§

impl Clone for Duration

source§

fn clone(&self) -> Duration

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
1.27.0 · source§

impl Debug for Duration

source§

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

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

impl Default for Duration

source§

fn default() -> Duration

Returns the “default value” for a type. Read more
source§

impl Div<u32> for Duration

§

type Output = Duration

The resulting type after applying the / operator.
source§

fn div(self, rhs: u32) -> Duration

Performs the / operation. Read more
1.9.0 · source§

impl DivAssign<u32> for Duration

source§

fn div_assign(&mut self, rhs: u32)

Performs the /= operation. Read more
source§

impl Hash for Duration

source§

fn hash<__H>(&self, state: &mut __H)
where + __H: Hasher,

Feeds this value into the given Hasher. Read more
source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Mul<u32> for Duration

§

type Output = Duration

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u32) -> Duration

Performs the * operation. Read more
1.9.0 · source§

impl MulAssign<u32> for Duration

source§

fn mul_assign(&mut self, rhs: u32)

Performs the *= operation. Read more
source§

impl Ord for Duration

source§

fn cmp(&self, other: &Duration) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Duration

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Duration

source§

fn partial_cmp(&self, other: &Duration) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
1.8.0 · source§

impl Sub<Duration> for Instant

§

type Output = Instant

The resulting type after applying the - operator.
source§

fn sub(self, other: Duration) -> Instant

Performs the - operation. Read more
source§

impl Sub for Duration

§

type Output = Duration

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Duration) -> Duration

Performs the - operation. Read more
1.9.0 · source§

impl SubAssign<Duration> for Instant

source§

fn sub_assign(&mut self, other: Duration)

Performs the -= operation. Read more
1.9.0 · source§

impl SubAssign for Duration

source§

fn sub_assign(&mut self, rhs: Duration)

Performs the -= operation. Read more
1.16.0 · source§

impl<'a> Sum<&'a Duration> for Duration

source§

fn sum<I>(iter: I) -> Duration
where + I: Iterator<Item = &'a Duration>,

Method which takes an iterator and generates Self from the elements by +“summing up” the items.
1.16.0 · source§

impl Sum for Duration

source§

fn sum<I>(iter: I) -> Duration
where + I: Iterator<Item = Duration>,

Method which takes an iterator and generates Self from the elements by +“summing up” the items.
source§

impl Copy for Duration

source§

impl Eq for Duration

source§

impl StructuralEq for Duration

source§

impl StructuralPartialEq for Duration

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
§

impl<Q, K> Comparable<K> for Q
where + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for Twhere - T: Clone,

§

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 Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<M> Measure for Mwhere - M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone,

source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<M> Measure for M
where + M: Debug + PartialOrd + Add<Output = M> + Default + Clone,

source§

impl<N> NodeTrait for N
where + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/reactor_rt/prelude/struct.EventTag.html b/reactor_rt/prelude/struct.EventTag.html deleted file mode 100644 index a2d75ded..00000000 --- a/reactor_rt/prelude/struct.EventTag.html +++ /dev/null @@ -1,50 +0,0 @@ -EventTag in reactor_rt::prelude - Rust
pub struct EventTag {
-    pub offset_from_t0: Duration,
-    pub microstep: MicroStep,
-}
Expand description

The tag of an event.

-

Tags correspond to a point on the logical timeline, and also -implement superdense time, which means an -infinite sequence of tags may be processed for any logical -instant. The label on this sequence is called the microstep -of the tag.

-

Use the tag! macro to create this struct with -convenient syntax.

-

Fields§

§offset_from_t0: Duration

The time offset from the origin of the logical timeline. -Knowing the start time of the application is necessary to -convert this to an absolute Instant (see Self::to_logical_time).

-
§microstep: MicroStep

The microstep of this tag.

-

Implementations§

source§

impl EventTag

source

pub const ORIGIN: EventTag = _

The tag of the startup event.

-
source

pub fn to_logical_time(&self, t0: Instant) -> Instant

Returns the logical instant for this tag, using the -initial time t0.

-
source

pub fn duration_since_start(&self) -> Duration

Returns the amount of time elapsed since the start -of the app.

- -
assert_eq!(tag1.duration_since_start(), tag1.to_logical_time(t0) - t0)
-
source

pub fn microstep(&self) -> MicroStep

Returns the microstep of this tag.

-
source

pub fn offset(offset_from_t0: Duration, microstep: u32) -> Self

Create a new tag from its offset from t0 and a microstep. -Use the tag! macro for more convenient syntax.

-

Trait Implementations§

source§

impl Clone for EventTag

source§

fn clone(&self) -> EventTag

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for EventTag

source§

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

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

impl Display for EventTag

source§

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

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

impl Hash for EventTag

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for EventTag

source§

fn cmp(&self, other: &EventTag) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<EventTag> for EventTag

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<EventTag> for EventTag

source§

fn partial_cmp(&self, other: &EventTag) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Copy for EventTag

source§

impl Eq for EventTag

source§

impl StructuralEq for EventTag

source§

impl StructuralPartialEq for EventTag

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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> ToOwned for Twhere - T: Clone,

§

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> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/reactor_rt/prelude/struct.Instant.html b/reactor_rt/prelude/struct.Instant.html index 8f15890f..96e4b6ec 100644 --- a/reactor_rt/prelude/struct.Instant.html +++ b/reactor_rt/prelude/struct.Instant.html @@ -1,4 +1,5 @@ -Instant in reactor_rt::prelude - Rust

Struct reactor_rt::prelude::Instant

1.8.0 · source ·
pub struct Instant(_);
Expand description

A measurement of a monotonically nondecreasing clock. +Instant in reactor_rt::prelude - Rust

+

Struct reactor_rt::prelude::Instant

1.8.0 · source ·
pub struct Instant(/* private fields */);
Expand description

A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.

Instants are always guaranteed, barring platform bugs, to be no less than any previously measured instant when created, and are often useful for tasks such as measuring @@ -7,7 +8,9 @@ words, each tick of the underlying clock might not be the same length (e.g. some seconds may be longer than others). An instant may jump forwards or experience time dilation (slow down or speed up), but it will never go -backwards.

+backwards. +As part of this non-guarantee it is also not specified whether system suspends count as +elapsed time or not. The behavior varies across platforms and rust versions.

Instants are opaque types that can only be compared to one another. There is no method to get “the number of seconds” from an instant. Instead, it only allows measuring the duration between two instants (or comparing two @@ -24,8 +27,8 @@ // we sleep for 2 seconds sleep(Duration::new(2, 0)); - // it prints '2' - println!("{}", now.elapsed().as_secs()); + // it prints '2' + println!("{}", now.elapsed().as_secs()); }

OS-specific behaviors

An Instant is a wrapper around system-specific types and it may behave @@ -37,17 +40,17 @@

OS-specific beha let now = Instant::now(); let max_seconds = u64::MAX / 1_000_000_000; let duration = Duration::new(max_seconds, 0); -println!("{:?}", now + duration);

+println!("{:?}", now + duration);

Underlying System calls

-

The following system calls are currently being used by now() to find out +

The following system calls are currently being used by now() to find out the current time:

@@ -66,12 +69,12 @@

Monotonicity

where monotonicity is violated, or Instants are subtracted in the wrong order.

This workaround obscures programming errors where earlier and later instants are accidentally swapped. For this reason future rust versions may reintroduce panics.

-

Implementations§

source§

impl Instant

source

pub fn now() -> Instant

Returns an instant corresponding to “now”.

+

Implementations§

source§

impl Instant

source

pub fn now() -> Instant

Returns an instant corresponding to “now”.

Examples
use std::time::Instant;
 
 let now = Instant::now();
-
source

pub fn duration_since(&self, earlier: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, +

source

pub fn duration_since(&self, earlier: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.

Panics

Previous rust versions panicked when earlier was later than self. Currently this @@ -84,9 +87,9 @@

Examples
let now = Instant::now(); sleep(Duration::new(1, 0)); let new_now = Instant::now(); -println!("{:?}", new_now.duration_since(now)); -println!("{:?}", now.duration_since(new_now)); // 0ns
-
1.39.0 · source

pub fn checked_duration_since(&self, earlier: Instant) -> Option<Duration>

Returns the amount of time elapsed from another instant to this one, +println!("{:?}", new_now.duration_since(now)); +println!("{:?}", now.duration_since(new_now)); // 0ns

+
1.39.0 · source

pub fn checked_duration_since(&self, earlier: Instant) -> Option<Duration>

Returns the amount of time elapsed from another instant to this one, or None if that instant is later than this one.

Due to monotonicity bugs, even under correct logical ordering of the passed Instants, this method can return None.

@@ -97,9 +100,9 @@
Examples
let now = Instant::now(); sleep(Duration::new(1, 0)); let new_now = Instant::now(); -println!("{:?}", new_now.checked_duration_since(now)); -println!("{:?}", now.checked_duration_since(new_now)); // None
-
1.39.0 · source

pub fn saturating_duration_since(&self, earlier: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, +println!("{:?}", new_now.checked_duration_since(now)); +println!("{:?}", now.checked_duration_since(new_now)); // None

+
1.39.0 · source

pub fn saturating_duration_since(&self, earlier: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.

Examples
use std::time::{Duration, Instant};
@@ -108,9 +111,9 @@ 
Examples
let now = Instant::now(); sleep(Duration::new(1, 0)); let new_now = Instant::now(); -println!("{:?}", new_now.saturating_duration_since(now)); -println!("{:?}", now.saturating_duration_since(new_now)); // 0ns
-
source

pub fn elapsed(&self) -> Duration

Returns the amount of time elapsed since this instant.

+println!("{:?}", new_now.saturating_duration_since(now)); +println!("{:?}", now.saturating_duration_since(new_now)); // 0ns
+
source

pub fn elapsed(&self) -> Duration

Returns the amount of time elapsed since this instant.

Panics

Previous rust versions panicked when the current time was earlier than self. Currently this method returns a Duration of zero in that case. Future versions may reintroduce the panic. @@ -123,43 +126,47 @@

Examples
let three_secs = Duration::from_secs(3); sleep(three_secs); assert!(instant.elapsed() >= three_secs);
-
1.34.0 · source

pub fn checked_add(&self, duration: Duration) -> Option<Instant>

Returns Some(t) where t is the time self + duration if t can be represented as +

1.34.0 · source

pub fn checked_add(&self, duration: Duration) -> Option<Instant>

Returns Some(t) where t is the time self + duration if t can be represented as Instant (which means it’s inside the bounds of the underlying data structure), None otherwise.

-
1.34.0 · source

pub fn checked_sub(&self, duration: Duration) -> Option<Instant>

Returns Some(t) where t is the time self - duration if t can be represented as +

1.34.0 · source

pub fn checked_sub(&self, duration: Duration) -> Option<Instant>

Returns Some(t) where t is the time self - duration if t can be represented as Instant (which means it’s inside the bounds of the underlying data structure), None otherwise.

-

Trait Implementations§

Trait Implementations§

source§

impl Add<Duration> for Instant

source§

fn add(self, other: Duration) -> Instant

Panics

This function may panic if the resulting point in time cannot be represented by the underlying data structure. See Instant::checked_add for a version without panic.

-
§

type Output = Instant

The resulting type after applying the + operator.
1.9.0 · source§

impl AddAssign<Duration> for Instant

source§

fn add_assign(&mut self, other: Duration)

Performs the += operation. Read more
source§

impl Clone for Instant

source§

fn clone(&self) -> Instant

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Instant

source§

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

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

impl Hash for Instant

source§

fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Instant

source§

fn cmp(&self, other: &Instant) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Instant> for Instant

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Instant> for Instant

source§

fn partial_cmp(&self, other: &Instant) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Sub<Duration> for Instant

§

type Output = Instant

The resulting type after applying the - operator.
source§

fn sub(self, other: Duration) -> Instant

Performs the - operation. Read more
source§

impl Sub<Instant> for Instant

source§

fn sub(self, other: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, +

§

type Output = Instant

The resulting type after applying the + operator.
1.9.0 · source§

impl AddAssign<Duration> for Instant

source§

fn add_assign(&mut self, other: Duration)

Performs the += operation. Read more
source§

impl Clone for Instant

source§

fn clone(&self) -> Instant

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Instant

source§

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

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

impl Hash for Instant

source§

fn hash<__H>(&self, state: &mut __H)
where + __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Instant

source§

fn cmp(&self, other: &Instant) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Instant

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Instant

source§

fn partial_cmp(&self, other: &Instant) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Sub<Duration> for Instant

§

type Output = Instant

The resulting type after applying the - operator.
source§

fn sub(self, other: Duration) -> Instant

Performs the - operation. Read more
source§

impl Sub for Instant

source§

fn sub(self, other: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.

-
Panics
+
Panics

Previous rust versions panicked when other was later than self. Currently this method saturates. Future versions may reintroduce the panic in some circumstances. See Monotonicity.

-
§

type Output = Duration

The resulting type after applying the - operator.
1.9.0 · source§

impl SubAssign<Duration> for Instant

source§

fn sub_assign(&mut self, other: Duration)

Performs the -= operation. Read more
source§

impl Copy for Instant

source§

impl Eq for Instant

source§

impl StructuralEq for Instant

source§

impl StructuralPartialEq for Instant

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+
§

type Output = Duration

The resulting type after applying the - operator.
1.9.0 · source§

impl SubAssign<Duration> for Instant

source§

fn sub_assign(&mut self, other: Duration)

Performs the -= operation. Read more
source§

impl Copy for Instant

source§

impl Eq for Instant

source§

impl StructuralEq for Instant

source§

impl StructuralPartialEq for Instant

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
§

impl<Q, K> Comparable<K> for Q
where + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for Twhere - T: Clone,

§

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 Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<N> NodeTrait for N
where + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/reactor_rt/prelude/struct.LogicalAction.html b/reactor_rt/prelude/struct.LogicalAction.html deleted file mode 100644 index ad66bb7d..00000000 --- a/reactor_rt/prelude/struct.LogicalAction.html +++ /dev/null @@ -1,27 +0,0 @@ -LogicalAction in reactor_rt::prelude - Rust
pub struct LogicalAction<T: Sync>(_);
Expand description

A logical action.

-

Trait Implementations§

source§

impl<T: Sync> ReactionTrigger<T> for LogicalAction<T>

source§

fn is_present(&self, now: &EventTag, start: &Instant) -> bool

Returns whether the trigger is present, given that -the current logical time is the parameter.
source§

fn get_value(&self, now: &EventTag, start: &Instant) -> Option<T>where - T: Copy,

Copies the value out, if it is present. Whether a value -is present is not in general the same thing as whether this trigger -Self::is_present. See crate::ReactionCtx::get.
source§

fn use_value_ref<O>( - &self, - now: &EventTag, - start: &Instant, - action: impl FnOnce(Option<&T>) -> O -) -> O

Execute an action using the current value of this trigger. -The closure is called even if the value is absent (with a None -argument).
source§

impl<T: Sync> SchedulableAsAction<T> for LogicalAction<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for LogicalAction<T>where - T: RefUnwindSafe,

§

impl<T> Send for LogicalAction<T>where - T: Send,

§

impl<T> Sync for LogicalAction<T>

§

impl<T> Unpin for LogicalAction<T>where - T: Unpin,

§

impl<T> UnwindSafe for LogicalAction<T>where - T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file diff --git a/reactor_rt/prelude/struct.Multiport.html b/reactor_rt/prelude/struct.Multiport.html deleted file mode 100644 index 2e8d1f92..00000000 --- a/reactor_rt/prelude/struct.Multiport.html +++ /dev/null @@ -1,37 +0,0 @@ -Multiport in reactor_rt::prelude - Rust
pub struct Multiport<T: Sync> { /* private fields */ }
Expand description

A multiport is a vector of independent ports (its channels) -Multiports have special Lingua Franca syntax, similar to reactor banks.

-

Implementations§

source§

impl<T: Sync> Multiport<T>

source

pub fn len(&self) -> usize

Returns the number of channels.

-
source

pub fn is_empty(&self) -> bool

Returns true if this multiport is empty.

-
source

pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Port<T>>

Iterate over the multiport and return mutable references to individual channels.

-
source

pub fn iter(&self) -> impl Iterator<Item = &Port<T>>

Iterate over the channels of this multiport. Returns read-only -references to individual ports.

-
source

pub fn enumerate_set(&self) -> impl Iterator<Item = (usize, &Port<T>)>

Iterate over only those channels that are set (have a value). -Returns a tuple with their index (not necessarily contiguous).

-
source

pub fn iterate_set(&self) -> impl Iterator<Item = &Port<T>>

Iterate over only those channels that are set (have a value). -The returned ports are not necessarily contiguous. See -Self::enumerate_set to get access to their index.

-
source

pub fn iterate_values(&self) -> impl Iterator<Item = T> + '_where - T: Copy,

Iterate over only those channels that are set (have a value), -and return a copy of the value. -The returned ports are not necessarily contiguous. See -Self::enumerate_values to get access to their index.

-
source

pub fn iterate_values_ref(&self) -> impl Iterator<Item = &T> + '_

Iterate over only those ports that are set (have a value), -and return a reference to the value. -The returned ports are not necessarily contiguous. See -Self::enumerate_values to get access to their index.

-
source

pub fn enumerate_values(&self) -> impl Iterator<Item = (usize, T)> + '_where - T: Copy,

Iterate over only those channels that are set (have a value), -yielding a tuple with their index in the bank and a copy of the value.

-
source

pub fn enumerate_values_ref(&self) -> impl Iterator<Item = (usize, &T)> + '_

Iterate over only those channels that are set (have a value), -yielding a tuple with their index in the bank and a reference to the value.

-

Trait Implementations§

source§

impl<T: Sync> Index<usize> for Multiport<T>

§

type Output = Port<T>

The returned type after indexing.
source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T: Sync> IndexMut<usize> for Multiport<T>

source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<'a, T: Sync> IntoIterator for &'a Multiport<T>

§

type Item = &'a Port<T>

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, Port<T>>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, T: Sync> IntoIterator for &'a mut Multiport<T>

§

type Item = &'a mut Port<T>

The type of the elements being iterated over.
§

type IntoIter = IterMut<'a, Port<T>>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for Multiport<T>

§

impl<T> !Send for Multiport<T>

§

impl<T> !Sync for Multiport<T>

§

impl<T> Unpin for Multiport<T>

§

impl<T> !UnwindSafe for Multiport<T>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file diff --git a/reactor_rt/prelude/struct.PhysicalActionRef.html b/reactor_rt/prelude/struct.PhysicalActionRef.html deleted file mode 100644 index 61368af1..00000000 --- a/reactor_rt/prelude/struct.PhysicalActionRef.html +++ /dev/null @@ -1,30 +0,0 @@ -PhysicalActionRef in reactor_rt::prelude - Rust
pub struct PhysicalActionRef<T: Sync>(_);
Expand description

A reference to a physical action. This thing is cloneable -and can be sent to async threads. The contained action -reference is unique and protected by a lock. All operations -on the action are

-

See crate::ReactionCtx::spawn_physical_thread.

-

Trait Implementations§

source§

impl<T: Clone + Sync> Clone for PhysicalActionRef<T>

source§

fn clone(&self) -> PhysicalActionRef<T>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<T: Sync> ReactionTrigger<T> for PhysicalActionRef<T>

source§

fn is_present(&self, now: &EventTag, start: &Instant) -> bool

Returns whether the trigger is present, given that -the current logical time is the parameter.
source§

fn get_value(&self, now: &EventTag, start: &Instant) -> Option<T>where - T: Copy,

Copies the value out, if it is present. Whether a value -is present is not in general the same thing as whether this trigger -Self::is_present. See crate::ReactionCtx::get.
source§

fn use_value_ref<O>( - &self, - now: &EventTag, - start: &Instant, - action: impl FnOnce(Option<&T>) -> O -) -> O

Execute an action using the current value of this trigger. -The closure is called even if the value is absent (with a None -argument).
source§

impl<T: Sync> SchedulableAsAction<T> for PhysicalActionRef<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for PhysicalActionRef<T>

§

impl<T> Send for PhysicalActionRef<T>where - T: Send,

§

impl<T> Sync for PhysicalActionRef<T>where - T: Send,

§

impl<T> Unpin for PhysicalActionRef<T>

§

impl<T> UnwindSafe for PhysicalActionRef<T>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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> ToOwned for Twhere - T: Clone,

§

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 Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file diff --git a/reactor_rt/prelude/struct.Port.html b/reactor_rt/prelude/struct.Port.html deleted file mode 100644 index b0200806..00000000 --- a/reactor_rt/prelude/struct.Port.html +++ /dev/null @@ -1,35 +0,0 @@ -Port in reactor_rt::prelude - Rust

Struct reactor_rt::prelude::Port

source ·
pub struct Port<T: Sync> { /* private fields */ }
Expand description

Represents a port, which carries values of type T. -Ports reify the data inputs and outputs of a reactor.

-

They may be bound to another port, in which case the -upstream port forwards all values to the output port -(logically instantaneously). A port may have only one -upstream binding.

-

Output ports may also be explicitly set -within a reaction, in which case they may not have an -upstream port binding.

-

Those structural constraints are trusted to have been -verified by the code generator. If necessary we may be -able to add conditional compilation flags that enable -runtime checks.

-

Trait Implementations§

source§

impl<T: Sync> ReactionTrigger<T> for Port<T>

source§

fn is_present(&self, _now: &EventTag, _start: &Instant) -> bool

Returns whether the trigger is present, given that -the current logical time is the parameter.
source§

fn get_value(&self, _now: &EventTag, _start: &Instant) -> Option<T>where - T: Copy,

Copies the value out, if it is present. Whether a value -is present is not in general the same thing as whether this trigger -Self::is_present. See crate::ReactionCtx::get.
source§

fn use_value_ref<O>( - &self, - _now: &EventTag, - _start: &Instant, - action: impl FnOnce(Option<&T>) -> O -) -> O

Execute an action using the current value of this trigger. -The closure is called even if the value is absent (with a None -argument).

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for Port<T>

§

impl<T> !Send for Port<T>

§

impl<T> !Sync for Port<T>

§

impl<T> Unpin for Port<T>

§

impl<T> !UnwindSafe for Port<T>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file diff --git a/reactor_rt/prelude/struct.ReactionCtx.html b/reactor_rt/prelude/struct.ReactionCtx.html deleted file mode 100644 index 2da03798..00000000 --- a/reactor_rt/prelude/struct.ReactionCtx.html +++ /dev/null @@ -1,198 +0,0 @@ -ReactionCtx in reactor_rt::prelude - Rust
pub struct ReactionCtx<'a, 'x> { /* private fields */ }
Expand description

The context in which a reaction executes. Its API -allows mutating the event queue of the scheduler. -Only the interactions declared at assembly time -are allowed.

-

Implementations§

source§

impl<'a, 'x> ReactionCtx<'a, 'x>

source

pub fn get_start_time(&self) -> Instant

Returns the start time of the execution of this program.

-

This is a logical instant with microstep zero.

-
source

pub fn get_physical_time(&self) -> Instant

Returns the current physical time.

-

Repeated invocation of this method may produce different -values, although Instant is monotonic. The -physical time is necessarily greater than the logical time.

-
source

pub fn get_logical_time(&self) -> Instant

Returns the current logical time.

-

Logical time is frozen during the execution of a reaction. -Repeated invocation of this method will always produce -the same value.

-
source

pub fn get_tag(&self) -> EventTag

Returns the tag at which the reaction executes.

-

Repeated invocation of this method will always produce -the same value.

-
source

pub fn is_shutdown(&self) -> bool

Returns whether this tag is the shutdown tag of the -application. If so, it’s necessarily the very last -invocation of the current reaction (on a given reactor -instance).

-

Repeated invocation of this method will always produce -the same value.

-
source

pub fn get_elapsed_logical_time(&self) -> Duration

Returns the amount of logical time elapsed since the -start of the program. This does not take microsteps -into account.

-
source

pub fn get_elapsed_physical_time(&self) -> Duration

Returns the amount of physical time elapsed since the -start of the program.

-

Since this uses Self::get_physical_time, be aware that -this function’s result may change over time.

-
source

pub fn num_workers(&self) -> usize

Returns the number of active workers in the execution of -a reactor program.

-

Return values:

-
    -
  • 1 if threading is not enabled.
  • -
  • If threading is enabled and a number of workers was specified, -it returns that number.
  • -
  • And if the number of workers was left unspecified, -the return value might vary.
  • -
-
source

pub fn get<T: Copy>(&self, container: &impl ReactionTrigger<T>) -> Option<T>

Returns the current value of a port or action at this -logical time. If the value is absent, Option::None is -returned. This is the case if the action or port is -not present (Self::is_present), or if no value was -scheduled (action values are optional, see Self::schedule_with_v).

-

The value is copied out. See also Self::use_ref if this -is to be avoided.

-
Examples
-
if let Some(value) = ctx.get(port) {
-    // branch is taken if the port is set
-}
-
source

pub fn get_ref<'q, T>( - &self, - container: &'q impl ReactionTriggerWithRefAccess<T> -) -> Option<&'q T>

Returns a reference to the current value of a port or action at this -logical time. If the value is absent, Option::None is -returned. This is the case if the action or port is -not present (Self::is_present), or if no value was -scheduled (action values are optional, see Self::schedule_with_v).

-

This does not require the value to be Copy, however, the implementation -of this method currently may require unsafe code. The method is therefore -not offered when compiling with the no-unsafe feature.

-
Examples
-
if let Some(value) = ctx.get_ref(port) {
-    // value is a ref to the internal value
-}
-
source

pub fn use_ref<T, O>( - &self, - container: &impl ReactionTrigger<T>, - action: impl FnOnce(Option<&T>) -> O -) -> O

Executes the provided closure on the value of the port -or action. The value is fetched by reference and not -copied.

-
Examples
-
let len = ctx.use_ref(port, |str| str.map(String::len).unwrap_or(0));
-// equivalent to
-let len = ctx.use_ref_opt(port, String::len).unwrap_or(0);
- -

-if let Some(str) = ctx.use_ref_opt(port, Clone::clone) {
-    // only entered if the port value is present, so no need to check is_present
-}
-

See also the similar Self::use_ref_opt.

-
source

pub fn use_ref_opt<T, O>( - &self, - container: &impl ReactionTrigger<T>, - action: impl FnOnce(&T) -> O -) -> Option<O>

Executes the provided closure on the value of the port, -only if it is present. The value is fetched by reference -and not copied.

-

See also the similar Self::use_ref.

-
source

pub fn set<T>(&mut self, port: &mut Port<T>, value: T)where - T: Sync,

Sets the value of the given port.

-

The change is visible at the same logical time, i.e. -the value propagates immediately. This may hence -schedule more reactions that should execute at the -same logical time.

-
source

pub fn set_opt<T>(&mut self, port: &mut Port<T>, value: Option<T>)where - T: Sync,

Sets the value of the given port, if the given value is Some. -Otherwise the port is not set and no reactions are triggered.

-

The change is visible at the same logical time, i.e. -the value propagates immediately. This may hence -schedule more reactions that should execute at the -same logical time.

- -

-ctx.set_opt(sink, ctx.get(source));
-// equivalent to
-if let Some(value) = ctx.get(source) {
-    ctx.set(sink, value);
-}
-
source

pub fn is_present<T>(&self, action: &impl ReactionTrigger<T>) -> bool

Returns true if the given action was triggered at the -current logical time.

-

If so, then it may, but must not, present a value (Self::get).

-
source

pub fn schedule<T: Sync>( - &mut self, - action: &mut impl SchedulableAsAction<T>, - offset: Offset -)

Schedule an action to trigger at some point in the future. -The action will trigger after its own implicit time delay, -plus an optional additional time delay (see Offset). This -delay is added to the current logical (resp. physical) time -for logical (resp. physical) actions.

-

This is like Self::schedule_with_v, where the value is None.

-
Examples
-
ctx.schedule(action, Asap);         // will be executed one microstep from now (+ own delay)
-ctx.schedule(action, after!(2 ms)); // will be executed 2 milliseconds from now (+ own delay)
-ctx.schedule(action, After(delay!(2 ms)));             // equivalent to the previous
-ctx.schedule(action, After(Duration::from_millis(2))); // equivalent to the previous
-
source

pub fn schedule_with_v<T: Sync>( - &mut self, - action: &mut impl SchedulableAsAction<T>, - value: Option<T>, - offset: Offset -)

Schedule an action to trigger at some point in the future,

-

The action will carry the given value at the time it -is triggered, unless it is overwritten by another call -to this method. The value can be cleared by using None -as a value. Note that even if the value is absent, the -action will still be present at the time it is triggered -(see Self::is_present).

-

The action will trigger after its own implicit time delay, -plus an optional additional time delay (see Offset). This -delay is added to the current logical (resp. physical) time -for logical (resp. physical) actions.

-
Examples
-
// will be executed 2 milliseconds (+ own delay) from now with that value.
-ctx.schedule_with_v(action, Some("value"), after!(2 msec));
-// will be executed one microstep from now, with no value
-ctx.schedule_with_v(action, None, Asap);
-// that's equivalent to
-ctx.schedule(action, Asap);
-
source

pub fn spawn_physical_thread<F, R>(&mut self, f: F) -> JoinHandle<R>where - F: FnOnce(&mut AsyncCtx) -> R + Send + 'static, - R: Send + 'static,

Spawn a new thread that can use a AsyncCtx -to push asynchronous events to the reaction queue. This is -only useful with physical actions.

-

Since the thread is allowed to keep references into the -internals of the scheduler, it is joined when the scheduler -shuts down. This means the scheduler will wait for the -thread to finish its task. For that reason, the thread’s -closure should not execute an infinite loop, it should at -least check that the scheduler has not been terminated by -polling AsyncCtx::was_terminated.

-
Example
-
fn some_reaction(ctx: &mut ReactionCtx, phys_action: &PhysicalActionRef<u32>) {
-    let phys_action = phys_action.clone(); // clone to move it into other thread
-    ctx.spawn_physical_thread(move |link| {
-        std::thread::sleep(Duration::from_millis(200));
-        // This will push an event whose tag is the
-        // current physical time at the point of this
-        // statement.
-        link.schedule_physical_with_v(&phys_action, Some(123), Asap).unwrap();
-    });
-}
-
source

pub fn request_stop(&mut self, offset: Offset)

Request that the application shutdown, possibly with -a particular offset. Just like for actions, even a zero -offset will only trigger the special shutdown trigger -at the earliest one microstep after the current tag.

- -
// trigger shutdown on the next microstep
-ctx.request_stop(Asap);
-
-// trigger shutdown in *at most* 1 msec (in logical time).
-// If in the meantime, another `request_stop` call schedules
-// shutdown for an earlier tag, that one will be honored instead.
-ctx.request_stop(after!(1 msec));
-

Auto Trait Implementations§

§

impl<'a, 'x> RefUnwindSafe for ReactionCtx<'a, 'x>

§

impl<'a, 'x> Send for ReactionCtx<'a, 'x>

§

impl<'a, 'x> Sync for ReactionCtx<'a, 'x>

§

impl<'a, 'x> Unpin for ReactionCtx<'a, 'x>

§

impl<'a, 'x> UnwindSafe for ReactionCtx<'a, 'x>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file diff --git a/reactor_rt/prelude/struct.Timer.html b/reactor_rt/prelude/struct.Timer.html deleted file mode 100644 index 0875efcc..00000000 --- a/reactor_rt/prelude/struct.Timer.html +++ /dev/null @@ -1,37 +0,0 @@ -Timer in reactor_rt::prelude - Rust

Struct reactor_rt::prelude::Timer

source ·
pub struct Timer {
-    pub offset: Duration,
-    pub period: Duration,
-    /* private fields */
-}
Expand description

A timer is conceptually a logical action that may re-schedule -itself periodically.

-

For periodic timers, a reaction is synthesized which reschedules -the timer.

-

Fields§

§offset: Duration

Minimal duration after the start of the program after -which the timer starts to trigger.

-
§period: Duration

Period between events emitted by this timer. A period -of zero means that the timer will trigger exactly once -after the specified offset.

-

Implementations§

source§

impl Timer

source

pub fn is_periodic(&self) -> bool

Whether the timer should repeat itself. A period of zero -means that the timer will trigger exactly once after the -specified offset.

-

Trait Implementations§

source§

impl ReactionTrigger<()> for Timer

source§

fn is_present(&self, now: &EventTag, _start: &Instant) -> bool

Returns whether the trigger is present, given that -the current logical time is the parameter.
source§

fn get_value(&self, now: &EventTag, start: &Instant) -> Option<()>

Copies the value out, if it is present. Whether a value -is present is not in general the same thing as whether this trigger -Self::is_present. See crate::ReactionCtx::get.
source§

fn use_value_ref<O>( - &self, - now: &EventTag, - start: &Instant, - action: impl FnOnce(Option<&()>) -> O -) -> O

Execute an action using the current value of this trigger. -The closure is called even if the value is absent (with a None -argument).

Auto Trait Implementations§

§

impl RefUnwindSafe for Timer

§

impl Send for Timer

§

impl Sync for Timer

§

impl Unpin for Timer

§

impl UnwindSafe for Timer

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file diff --git a/reactor_rt/prelude/type.unit.html b/reactor_rt/prelude/type.unit.html index 3e0dc9ca..977756d4 100644 --- a/reactor_rt/prelude/type.unit.html +++ b/reactor_rt/prelude/type.unit.html @@ -1,4 +1,5 @@ -unit in reactor_rt::prelude - Rust

Type Definition reactor_rt::prelude::unit

source ·
pub type unit = ();
Expand description

Alias for the unit type, so that it can be written without quotes in LF. +unit in reactor_rt::prelude - Rust

+

Type Alias reactor_rt::prelude::unit

source ·
pub type unit = ();
Expand description

Alias for the unit type, so that it can be written without quotes in LF. Otherwise it needs to be written {= () =}. It is not camel-case as it is actually a primitive type.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/reactor_rt/scheduler/context/struct.AsyncCtx.html b/reactor_rt/scheduler/context/struct.AsyncCtx.html index 80a9d3d9..f9386800 100644 --- a/reactor_rt/scheduler/context/struct.AsyncCtx.html +++ b/reactor_rt/scheduler/context/struct.AsyncCtx.html @@ -1,11 +1,11 @@ - + Redirection -

Redirecting to ../../../reactor_rt/prelude/struct.AsyncCtx.html...

- +

Redirecting to ../../../reactor_rt/struct.AsyncCtx.html...

+ \ No newline at end of file diff --git a/reactor_rt/scheduler/context/struct.ReactionCtx.html b/reactor_rt/scheduler/context/struct.ReactionCtx.html index bde46e02..005fda69 100644 --- a/reactor_rt/scheduler/context/struct.ReactionCtx.html +++ b/reactor_rt/scheduler/context/struct.ReactionCtx.html @@ -1,11 +1,11 @@ - + Redirection -

Redirecting to ../../../reactor_rt/prelude/struct.ReactionCtx.html...

- +

Redirecting to ../../../reactor_rt/struct.ReactionCtx.html...

+ \ No newline at end of file diff --git a/reactor_rt/scheduler/events/struct.EventTag.html b/reactor_rt/scheduler/events/struct.EventTag.html index 21b28b0f..1159f3c4 100644 --- a/reactor_rt/scheduler/events/struct.EventTag.html +++ b/reactor_rt/scheduler/events/struct.EventTag.html @@ -1,11 +1,11 @@ - + Redirection -

Redirecting to ../../../reactor_rt/prelude/struct.EventTag.html...

- +

Redirecting to ../../../reactor_rt/struct.EventTag.html...

+ \ No newline at end of file diff --git a/reactor_rt/struct.AsyncCtx.html b/reactor_rt/struct.AsyncCtx.html index fa224c05..0caba0ee 100644 --- a/reactor_rt/struct.AsyncCtx.html +++ b/reactor_rt/struct.AsyncCtx.html @@ -1,11 +1,12 @@ -AsyncCtx in reactor_rt - Rust

Struct reactor_rt::AsyncCtx

source ·
pub struct AsyncCtx { /* private fields */ }
Expand description

A type that can affect the logical event queue to implement +AsyncCtx in reactor_rt - Rust

+

Struct reactor_rt::AsyncCtx

source ·
pub struct AsyncCtx { /* private fields */ }
Expand description

A type that can affect the logical event queue to implement asynchronous physical actions. This is a “link” to the event system, from the outside world.

-

See ReactionCtx::spawn_physical_thread.

-

Implementations§

source§

impl AsyncCtx

source

pub fn was_terminated(&self) -> bool

Returns true if the scheduler has been shutdown. When +

See ReactionCtx::spawn_physical_thread.

+

Implementations§

source§

impl AsyncCtx

source

pub fn was_terminated(&self) -> bool

Returns true if the scheduler has been shutdown. When that’s true, calls to other methods of this type will fail with [SendError].

-
source

pub fn request_stop(&mut self, offset: Offset) -> Result<(), SendError<()>>

Request that the application shutdown, possibly with +

source

pub fn request_stop(&mut self, offset: Offset) -> Result<(), SendError<()>>

Request that the application shutdown, possibly with a particular offset from the current physical time.

This may fail if this is called while the scheduler has already been shutdown. An Ok result is also not @@ -13,11 +14,11 @@ scheduler may be in the process of shutting down, or its shutdown might be programmed for a logical time which precedes the current physical time.

-
source

pub fn schedule_physical<T: Sync>( +

source

pub fn schedule_physical<T: Sync>( &mut self, - action: &PhysicalActionRef<T>, + action: &PhysicalActionRef<T>, offset: Offset -) -> Result<(), SendError<Option<T>>>

Schedule an action to run after its own implicit time delay +) -> Result<(), SendError<Option<T>>>

Schedule an action to run after its own implicit time delay plus an optional additional time delay. These delays are in logical time.

Note that this locks the action.

@@ -27,12 +28,12 @@ scheduler may be in the process of shutting down, or its shutdown might be programmed for a logical time which precedes the current physical time.

-
source

pub fn schedule_physical_with_v<T: Sync>( +

source

pub fn schedule_physical_with_v<T: Sync>( &mut self, - action: &PhysicalActionRef<T>, - value: Option<T>, + action: &PhysicalActionRef<T>, + value: Option<T>, offset: Offset -) -> Result<(), SendError<Option<T>>>

Schedule an action to run after its own implicit time delay +) -> Result<(), SendError<Option<T>>>

Schedule an action to run after its own implicit time delay plus an optional additional time delay. These delays are in logical time.

Note that this locks the action.

@@ -42,15 +43,15 @@ scheduler may be in the process of shutting down, or its shutdown might be programmed for a logical time which precedes the current physical time.

-

Trait Implementations§

source§

impl Clone for AsyncCtx

source§

fn clone(&self) -> AsyncCtx

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Clone for AsyncCtx

source§

fn clone(&self) -> AsyncCtx

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more

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> 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> ToOwned for Twhere - T: Clone,

§

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 Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/struct.Duration.html b/reactor_rt/struct.Duration.html index cd586d20..0df20151 100644 --- a/reactor_rt/struct.Duration.html +++ b/reactor_rt/struct.Duration.html @@ -1,11 +1,12 @@ -Duration in reactor_rt - Rust

Struct reactor_rt::Duration

1.3.0 · source ·
pub struct Duration { /* private fields */ }
Expand description

A Duration type to represent a span of time, typically used for system +Duration in reactor_rt - Rust

+

Struct reactor_rt::Duration

1.3.0 · source ·
pub struct Duration { /* private fields */ }
Expand description

A Duration type to represent a span of time, typically used for system timeouts.

Each Duration is composed of a whole number of seconds and a fractional part represented in nanoseconds. If the underlying system does not support nanosecond-level precision, APIs binding a system timeout will typically round up the number of nanoseconds.

-

Durations implement many common traits, including Add, Sub, and other -ops traits. It implements Default by returning a zero-length Duration.

+

Durations implement many common traits, including Add, Sub, and other +ops traits. It implements Default by returning a zero-length Duration.

Examples

Implementations§

source§

impl Duration

source

pub const SECOND: Duration = Duration::from_secs(1)

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one second.

+

Implementations§

source§

impl Duration

source

pub const SECOND: Duration = _

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one second.

Examples
#![feature(duration_constants)]
 use std::time::Duration;
 
 assert_eq!(Duration::SECOND, Duration::from_secs(1));
-
source

pub const MILLISECOND: Duration = Duration::from_millis(1)

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one millisecond.

+
source

pub const MILLISECOND: Duration = _

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one millisecond.

Examples
#![feature(duration_constants)]
 use std::time::Duration;
 
 assert_eq!(Duration::MILLISECOND, Duration::from_millis(1));
-
source

pub const MICROSECOND: Duration = Duration::from_micros(1)

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one microsecond.

+
source

pub const MICROSECOND: Duration = _

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one microsecond.

Examples
#![feature(duration_constants)]
 use std::time::Duration;
 
 assert_eq!(Duration::MICROSECOND, Duration::from_micros(1));
-
source

pub const NANOSECOND: Duration = Duration::from_nanos(1)

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one nanosecond.

+
source

pub const NANOSECOND: Duration = _

🔬This is a nightly-only experimental API. (duration_constants)

The duration of one nanosecond.

Examples
#![feature(duration_constants)]
 use std::time::Duration;
 
 assert_eq!(Duration::NANOSECOND, Duration::from_nanos(1));
-
1.53.0 · source

pub const ZERO: Duration = Duration::from_nanos(0)

A duration of zero time.

+
1.53.0 · source

pub const ZERO: Duration = _

A duration of zero time.

Examples
use std::time::Duration;
 
 let duration = Duration::ZERO;
 assert!(duration.is_zero());
 assert_eq!(duration.as_nanos(), 0);
-
1.53.0 · source

pub const MAX: Duration = Duration::new(u64::MAX, NANOS_PER_SEC - 1)

The maximum duration.

+
1.53.0 · source

pub const MAX: Duration = _

The maximum duration.

May vary by platform as necessary. Must be able to contain the difference between two instances of Instant or two instances of SystemTime. This constraint gives it a value of about 584,942,417,355 years in practice, @@ -64,7 +65,7 @@

Examples
use std::time::Duration;
 
 assert_eq!(Duration::MAX, Duration::new(u64::MAX, 1_000_000_000 - 1));
-
const: 1.58.0 · source

pub const fn new(secs: u64, nanos: u32) -> Duration

Creates a new Duration from the specified number of whole seconds and +

const: 1.58.0 · source

pub const fn new(secs: u64, nanos: u32) -> Duration

Creates a new Duration from the specified number of whole seconds and additional nanoseconds.

If the number of nanoseconds is greater than 1 billion (the number of nanoseconds in a second), then it will carry over into the seconds provided.

@@ -75,7 +76,7 @@
Examples
use std::time::Duration;
 
 let five_seconds = Duration::new(5, 0);
-
const: 1.32.0 · source

pub const fn from_secs(secs: u64) -> Duration

Creates a new Duration from the specified number of whole seconds.

+
const: 1.32.0 · source

pub const fn from_secs(secs: u64) -> Duration

Creates a new Duration from the specified number of whole seconds.

Examples
use std::time::Duration;
 
@@ -83,7 +84,7 @@ 
Examples
assert_eq!(5, duration.as_secs()); assert_eq!(0, duration.subsec_nanos());
-
const: 1.32.0 · source

pub const fn from_millis(millis: u64) -> Duration

Creates a new Duration from the specified number of milliseconds.

+
const: 1.32.0 · source

pub const fn from_millis(millis: u64) -> Duration

Creates a new Duration from the specified number of milliseconds.

Examples
use std::time::Duration;
 
@@ -91,7 +92,7 @@ 
Examples
assert_eq!(2, duration.as_secs()); assert_eq!(569_000_000, duration.subsec_nanos());
-
1.27.0 (const: 1.32.0) · source

pub const fn from_micros(micros: u64) -> Duration

Creates a new Duration from the specified number of microseconds.

+
1.27.0 (const: 1.32.0) · source

pub const fn from_micros(micros: u64) -> Duration

Creates a new Duration from the specified number of microseconds.

Examples
use std::time::Duration;
 
@@ -99,7 +100,7 @@ 
Examples
assert_eq!(1, duration.as_secs()); assert_eq!(2000, duration.subsec_nanos());
-
1.27.0 (const: 1.32.0) · source

pub const fn from_nanos(nanos: u64) -> Duration

Creates a new Duration from the specified number of nanoseconds.

+
1.27.0 (const: 1.32.0) · source

pub const fn from_nanos(nanos: u64) -> Duration

Creates a new Duration from the specified number of nanoseconds.

Examples
use std::time::Duration;
 
@@ -107,7 +108,7 @@ 
Examples
assert_eq!(1, duration.as_secs()); assert_eq!(123, duration.subsec_nanos());
-
1.53.0 (const: 1.53.0) · source

pub const fn is_zero(&self) -> bool

Returns true if this Duration spans no time.

+
1.53.0 (const: 1.53.0) · source

pub const fn is_zero(&self) -> bool

Returns true if this Duration spans no time.

Examples
use std::time::Duration;
 
@@ -119,7 +120,7 @@ 
Examples
assert!(!Duration::new(1, 1).is_zero()); assert!(!Duration::from_nanos(1).is_zero()); assert!(!Duration::from_secs(1).is_zero());
-
const: 1.32.0 · source

pub const fn as_secs(&self) -> u64

Returns the number of whole seconds contained by this Duration.

+
const: 1.32.0 · source

pub const fn as_secs(&self) -> u64

Returns the number of whole seconds contained by this Duration.

The returned value does not include the fractional (nanosecond) part of the duration, which can be obtained using subsec_nanos.

Examples
@@ -129,7 +130,7 @@
Examples
assert_eq!(duration.as_secs(), 5);

To determine the total number of seconds represented by the Duration including the fractional part, use as_secs_f64 or as_secs_f32

-
1.27.0 (const: 1.32.0) · source

pub const fn subsec_millis(&self) -> u32

Returns the fractional part of this Duration, in whole milliseconds.

+
1.27.0 (const: 1.32.0) · source

pub const fn subsec_millis(&self) -> u32

Returns the fractional part of this Duration, in whole milliseconds.

This method does not return the length of the duration when represented by milliseconds. The returned number always represents a fractional portion of a second (i.e., it is less than one thousand).

@@ -139,7 +140,7 @@
Examples
let duration = Duration::from_millis(5432); assert_eq!(duration.as_secs(), 5); assert_eq!(duration.subsec_millis(), 432);
-
1.27.0 (const: 1.32.0) · source

pub const fn subsec_micros(&self) -> u32

Returns the fractional part of this Duration, in whole microseconds.

+
1.27.0 (const: 1.32.0) · source

pub const fn subsec_micros(&self) -> u32

Returns the fractional part of this Duration, in whole microseconds.

This method does not return the length of the duration when represented by microseconds. The returned number always represents a fractional portion of a second (i.e., it is less than one million).

@@ -149,7 +150,7 @@
Examples
let duration = Duration::from_micros(1_234_567); assert_eq!(duration.as_secs(), 1); assert_eq!(duration.subsec_micros(), 234_567);
-
const: 1.32.0 · source

pub const fn subsec_nanos(&self) -> u32

Returns the fractional part of this Duration, in nanoseconds.

+
const: 1.32.0 · source

pub const fn subsec_nanos(&self) -> u32

Returns the fractional part of this Duration, in nanoseconds.

This method does not return the length of the duration when represented by nanoseconds. The returned number always represents a fractional portion of a second (i.e., it is less than one billion).

@@ -159,77 +160,86 @@
Examples
let duration = Duration::from_millis(5010); assert_eq!(duration.as_secs(), 5); assert_eq!(duration.subsec_nanos(), 10_000_000);
-
1.33.0 (const: 1.33.0) · source

pub const fn as_millis(&self) -> u128

Returns the total number of whole milliseconds contained by this Duration.

+
1.33.0 (const: 1.33.0) · source

pub const fn as_millis(&self) -> u128

Returns the total number of whole milliseconds contained by this Duration.

Examples
use std::time::Duration;
 
 let duration = Duration::new(5, 730023852);
 assert_eq!(duration.as_millis(), 5730);
-
1.33.0 (const: 1.33.0) · source

pub const fn as_micros(&self) -> u128

Returns the total number of whole microseconds contained by this Duration.

+
1.33.0 (const: 1.33.0) · source

pub const fn as_micros(&self) -> u128

Returns the total number of whole microseconds contained by this Duration.

Examples
use std::time::Duration;
 
 let duration = Duration::new(5, 730023852);
 assert_eq!(duration.as_micros(), 5730023);
-
1.33.0 (const: 1.33.0) · source

pub const fn as_nanos(&self) -> u128

Returns the total number of nanoseconds contained by this Duration.

+
1.33.0 (const: 1.33.0) · source

pub const fn as_nanos(&self) -> u128

Returns the total number of nanoseconds contained by this Duration.

Examples
use std::time::Duration;
 
 let duration = Duration::new(5, 730023852);
 assert_eq!(duration.as_nanos(), 5730023852);
-
1.16.0 (const: 1.58.0) · source

pub const fn checked_add(self, rhs: Duration) -> Option<Duration>

Checked Duration addition. Computes self + other, returning None -if overflow occurred.

+
source

pub const fn abs_diff(self, other: Duration) -> Duration

🔬This is a nightly-only experimental API. (duration_abs_diff)

Computes the absolute difference between self and other.

Examples

Basic usage:

+
#![feature(duration_abs_diff)]
+use std::time::Duration;
+
+assert_eq!(Duration::new(100, 0).abs_diff(Duration::new(80, 0)), Duration::new(20, 0));
+assert_eq!(Duration::new(100, 400_000_000).abs_diff(Duration::new(110, 0)), Duration::new(9, 600_000_000));
+
1.16.0 (const: 1.58.0) · source

pub const fn checked_add(self, rhs: Duration) -> Option<Duration>

Checked Duration addition. Computes self + other, returning None +if overflow occurred.

+
Examples
+

Basic usage:

+
use std::time::Duration;
 
 assert_eq!(Duration::new(0, 0).checked_add(Duration::new(0, 1)), Some(Duration::new(0, 1)));
 assert_eq!(Duration::new(1, 0).checked_add(Duration::new(u64::MAX, 0)), None);
-
1.53.0 (const: 1.58.0) · source

pub const fn saturating_add(self, rhs: Duration) -> Duration

Saturating Duration addition. Computes self + other, returning Duration::MAX +

1.53.0 (const: 1.58.0) · source

pub const fn saturating_add(self, rhs: Duration) -> Duration

Saturating Duration addition. Computes self + other, returning Duration::MAX if overflow occurred.

-
Examples
+
Examples
#![feature(duration_constants)]
 use std::time::Duration;
 
 assert_eq!(Duration::new(0, 0).saturating_add(Duration::new(0, 1)), Duration::new(0, 1));
 assert_eq!(Duration::new(1, 0).saturating_add(Duration::new(u64::MAX, 0)), Duration::MAX);
-
1.16.0 (const: 1.58.0) · source

pub const fn checked_sub(self, rhs: Duration) -> Option<Duration>

Checked Duration subtraction. Computes self - other, returning None +

1.16.0 (const: 1.58.0) · source

pub const fn checked_sub(self, rhs: Duration) -> Option<Duration>

Checked Duration subtraction. Computes self - other, returning None if the result would be negative or if overflow occurred.

-
Examples
+
Examples

Basic usage:

use std::time::Duration;
 
 assert_eq!(Duration::new(0, 1).checked_sub(Duration::new(0, 0)), Some(Duration::new(0, 1)));
 assert_eq!(Duration::new(0, 0).checked_sub(Duration::new(0, 1)), None);
-
1.53.0 (const: 1.58.0) · source

pub const fn saturating_sub(self, rhs: Duration) -> Duration

Saturating Duration subtraction. Computes self - other, returning Duration::ZERO +

1.53.0 (const: 1.58.0) · source

pub const fn saturating_sub(self, rhs: Duration) -> Duration

Saturating Duration subtraction. Computes self - other, returning Duration::ZERO if the result would be negative or if overflow occurred.

-
Examples
+
Examples
use std::time::Duration;
 
 assert_eq!(Duration::new(0, 1).saturating_sub(Duration::new(0, 0)), Duration::new(0, 1));
 assert_eq!(Duration::new(0, 0).saturating_sub(Duration::new(0, 1)), Duration::ZERO);
-
1.16.0 (const: 1.58.0) · source

pub const fn checked_mul(self, rhs: u32) -> Option<Duration>

Checked Duration multiplication. Computes self * other, returning -None if overflow occurred.

-
Examples
+
1.16.0 (const: 1.58.0) · source

pub const fn checked_mul(self, rhs: u32) -> Option<Duration>

Checked Duration multiplication. Computes self * other, returning +None if overflow occurred.

+
Examples

Basic usage:

use std::time::Duration;
 
 assert_eq!(Duration::new(0, 500_000_001).checked_mul(2), Some(Duration::new(1, 2)));
 assert_eq!(Duration::new(u64::MAX - 1, 0).checked_mul(2), None);
-
1.53.0 (const: 1.58.0) · source

pub const fn saturating_mul(self, rhs: u32) -> Duration

Saturating Duration multiplication. Computes self * other, returning +

1.53.0 (const: 1.58.0) · source

pub const fn saturating_mul(self, rhs: u32) -> Duration

Saturating Duration multiplication. Computes self * other, returning Duration::MAX if overflow occurred.

-
Examples
+
Examples
#![feature(duration_constants)]
 use std::time::Duration;
 
 assert_eq!(Duration::new(0, 500_000_001).saturating_mul(2), Duration::new(1, 2));
 assert_eq!(Duration::new(u64::MAX - 1, 0).saturating_mul(2), Duration::MAX);
-
1.16.0 (const: 1.58.0) · source

pub const fn checked_div(self, rhs: u32) -> Option<Duration>

Checked Duration division. Computes self / other, returning None +

1.16.0 (const: 1.58.0) · source

pub const fn checked_div(self, rhs: u32) -> Option<Duration>

Checked Duration division. Computes self / other, returning None if other == 0.

-
Examples
+
Examples

Basic usage:

use std::time::Duration;
@@ -237,25 +247,25 @@ 
Examples
assert_eq!(Duration::new(2, 0).checked_div(2), Some(Duration::new(1, 0))); assert_eq!(Duration::new(1, 0).checked_div(2), Some(Duration::new(0, 500_000_000))); assert_eq!(Duration::new(2, 0).checked_div(0), None);
-
1.38.0 (const: unstable) · source

pub fn as_secs_f64(&self) -> f64

Returns the number of seconds contained by this Duration as f64.

+
1.38.0 (const: unstable) · source

pub fn as_secs_f64(&self) -> f64

Returns the number of seconds contained by this Duration as f64.

The returned value does include the fractional (nanosecond) part of the duration.

-
Examples
+
Examples
use std::time::Duration;
 
 let dur = Duration::new(2, 700_000_000);
 assert_eq!(dur.as_secs_f64(), 2.7);
-
1.38.0 (const: unstable) · source

pub fn as_secs_f32(&self) -> f32

Returns the number of seconds contained by this Duration as f32.

+
1.38.0 (const: unstable) · source

pub fn as_secs_f32(&self) -> f32

Returns the number of seconds contained by this Duration as f32.

The returned value does include the fractional (nanosecond) part of the duration.

-
Examples
+
Examples
use std::time::Duration;
 
 let dur = Duration::new(2, 700_000_000);
 assert_eq!(dur.as_secs_f32(), 2.7);
-
1.38.0 (const: unstable) · source

pub fn from_secs_f64(secs: f64) -> Duration

Creates a new Duration from the specified number of seconds represented +

1.38.0 · source

pub fn from_secs_f64(secs: f64) -> Duration

Creates a new Duration from the specified number of seconds represented as f64.

Panics

This constructor will panic if secs is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let res = Duration::from_secs_f64(0.0);
@@ -274,11 +284,11 @@ 
Examples
// conversion uses rounding let res = Duration::from_secs_f64(0.999e-9); assert_eq!(res, Duration::new(0, 1));
-
1.38.0 (const: unstable) · source

pub fn from_secs_f32(secs: f32) -> Duration

Creates a new Duration from the specified number of seconds represented +

1.38.0 · source

pub fn from_secs_f32(secs: f32) -> Duration

Creates a new Duration from the specified number of seconds represented as f32.

Panics

This constructor will panic if secs is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let res = Duration::from_secs_f32(0.0);
@@ -297,37 +307,37 @@ 
Examples
// conversion uses rounding let res = Duration::from_secs_f32(0.999e-9); assert_eq!(res, Duration::new(0, 1));
-
1.38.0 (const: unstable) · source

pub fn mul_f64(self, rhs: f64) -> Duration

Multiplies Duration by f64.

+
1.38.0 · source

pub fn mul_f64(self, rhs: f64) -> Duration

Multiplies Duration by f64.

Panics

This method will panic if result is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let dur = Duration::new(2, 700_000_000);
 assert_eq!(dur.mul_f64(3.14), Duration::new(8, 478_000_000));
 assert_eq!(dur.mul_f64(3.14e5), Duration::new(847_800, 0));
-
1.38.0 (const: unstable) · source

pub fn mul_f32(self, rhs: f32) -> Duration

Multiplies Duration by f32.

+
1.38.0 · source

pub fn mul_f32(self, rhs: f32) -> Duration

Multiplies Duration by f32.

Panics

This method will panic if result is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let dur = Duration::new(2, 700_000_000);
 assert_eq!(dur.mul_f32(3.14), Duration::new(8, 478_000_641));
 assert_eq!(dur.mul_f32(3.14e5), Duration::new(847800, 0));
-
1.38.0 (const: unstable) · source

pub fn div_f64(self, rhs: f64) -> Duration

Divide Duration by f64.

+
1.38.0 · source

pub fn div_f64(self, rhs: f64) -> Duration

Divide Duration by f64.

Panics

This method will panic if result is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let dur = Duration::new(2, 700_000_000);
 assert_eq!(dur.div_f64(3.14), Duration::new(0, 859_872_611));
 assert_eq!(dur.div_f64(3.14e5), Duration::new(0, 8_599));
-
1.38.0 (const: unstable) · source

pub fn div_f32(self, rhs: f32) -> Duration

Divide Duration by f32.

+
1.38.0 · source

pub fn div_f32(self, rhs: f32) -> Duration

Divide Duration by f32.

Panics

This method will panic if result is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let dur = Duration::new(2, 700_000_000);
@@ -335,25 +345,25 @@ 
Examples
// different from 0.859_872_611 assert_eq!(dur.div_f32(3.14), Duration::new(0, 859_872_580)); assert_eq!(dur.div_f32(3.14e5), Duration::new(0, 8_599));
-
const: unstable · source

pub fn div_duration_f64(self, rhs: Duration) -> f64

🔬This is a nightly-only experimental API. (div_duration)

Divide Duration by Duration and return f64.

-
Examples
+
const: unstable · source

pub fn div_duration_f64(self, rhs: Duration) -> f64

🔬This is a nightly-only experimental API. (div_duration)

Divide Duration by Duration and return f64.

+
Examples
#![feature(div_duration)]
 use std::time::Duration;
 
 let dur1 = Duration::new(2, 700_000_000);
 let dur2 = Duration::new(5, 400_000_000);
 assert_eq!(dur1.div_duration_f64(dur2), 0.5);
-
const: unstable · source

pub fn div_duration_f32(self, rhs: Duration) -> f32

🔬This is a nightly-only experimental API. (div_duration)

Divide Duration by Duration and return f32.

-
Examples
+
const: unstable · source

pub fn div_duration_f32(self, rhs: Duration) -> f32

🔬This is a nightly-only experimental API. (div_duration)

Divide Duration by Duration and return f32.

+
Examples
#![feature(div_duration)]
 use std::time::Duration;
 
 let dur1 = Duration::new(2, 700_000_000);
 let dur2 = Duration::new(5, 400_000_000);
 assert_eq!(dur1.div_duration_f32(dur2), 0.5);
-
source§

impl Duration

1.66.0 (const: unstable) · source

pub fn try_from_secs_f32(secs: f32) -> Result<Duration, TryFromFloatSecsError>

The checked version of from_secs_f32.

+
source§

impl Duration

1.66.0 · source

pub fn try_from_secs_f32(secs: f32) -> Result<Duration, TryFromFloatSecsError>

The checked version of from_secs_f32.

This constructor will return an Err if secs is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let res = Duration::try_from_secs_f32(0.0);
@@ -400,9 +410,9 @@ 
Examples
let val = f32::from_bits(0x3F806000); let res = Duration::try_from_secs_f32(val); assert_eq!(res, Ok(Duration::new(1, 2_929_688)));
-
1.66.0 (const: unstable) · source

pub fn try_from_secs_f64(secs: f64) -> Result<Duration, TryFromFloatSecsError>

The checked version of from_secs_f64.

+
1.66.0 · source

pub fn try_from_secs_f64(secs: f64) -> Result<Duration, TryFromFloatSecsError>

The checked version of from_secs_f64.

This constructor will return an Err if secs is negative, overflows Duration or not finite.

-
Examples
+
Examples
use std::time::Duration;
 
 let res = Duration::try_from_secs_f64(0.0);
@@ -457,36 +467,40 @@ 
Examples
let val = f64::from_bits(0x3_FF00_C000_0000_000); let res = Duration::try_from_secs_f64(val); assert_eq!(res, Ok(Duration::new(1, 2_929_688)));
-

Trait Implementations§

source§

impl Add<Duration> for Duration

§

type Output = Duration

The resulting type after applying the + operator.
source§

fn add(self, rhs: Duration) -> Duration

Performs the + operation. Read more
1.8.0 · source§

impl Add<Duration> for Instant

source§

fn add(self, other: Duration) -> Instant

Trait Implementations§

1.8.0 · source§

impl Add<Duration> for Instant

source§

fn add(self, other: Duration) -> Instant

Panics

This function may panic if the resulting point in time cannot be represented by the underlying data structure. See Instant::checked_add for a version without panic.

-
§

type Output = Instant

The resulting type after applying the + operator.
1.9.0 · source§

impl AddAssign<Duration> for Duration

source§

fn add_assign(&mut self, rhs: Duration)

Performs the += operation. Read more
1.9.0 · source§

impl AddAssign<Duration> for Instant

source§

fn add_assign(&mut self, other: Duration)

Performs the += operation. Read more
source§

impl Clone for Duration

source§

fn clone(&self) -> Duration

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
1.27.0 · source§

impl Debug for Duration

source§

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

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

impl Default for Duration

source§

fn default() -> Duration

Returns the “default value” for a type. Read more
source§

impl Div<u32> for Duration

§

type Output = Duration

The resulting type after applying the / operator.
source§

fn div(self, rhs: u32) -> Duration

Performs the / operation. Read more
1.9.0 · source§

impl DivAssign<u32> for Duration

source§

fn div_assign(&mut self, rhs: u32)

Performs the /= operation. Read more
source§

impl Hash for Duration

source§

fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

Feeds this value into the given Hasher. Read more
source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Mul<u32> for Duration

§

type Output = Duration

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u32) -> Duration

Performs the * operation. Read more
1.9.0 · source§

impl MulAssign<u32> for Duration

source§

fn mul_assign(&mut self, rhs: u32)

Performs the *= operation. Read more
source§

impl Ord for Duration

source§

fn cmp(&self, other: &Duration) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Duration> for Duration

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Duration> for Duration

source§

fn partial_cmp(&self, other: &Duration) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Sub<Duration> for Duration

§

type Output = Duration

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Duration) -> Duration

Performs the - operation. Read more
1.8.0 · source§

impl Sub<Duration> for Instant

§

type Output = Instant

The resulting type after applying the - operator.
source§

fn sub(self, other: Duration) -> Instant

Performs the - operation. Read more
1.9.0 · source§

impl SubAssign<Duration> for Duration

source§

fn sub_assign(&mut self, rhs: Duration)

Performs the -= operation. Read more
1.9.0 · source§

impl SubAssign<Duration> for Instant

source§

fn sub_assign(&mut self, other: Duration)

Performs the -= operation. Read more
1.16.0 · source§

impl<'a> Sum<&'a Duration> for Duration

source§

fn sum<I>(iter: I) -> Durationwhere - I: Iterator<Item = &'a Duration>,

Method which takes an iterator and generates Self from the elements by -“summing up” the items.
1.16.0 · source§

impl Sum<Duration> for Duration

source§

fn sum<I>(iter: I) -> Durationwhere - I: Iterator<Item = Duration>,

Method which takes an iterator and generates Self from the elements by -“summing up” the items.
source§

impl Copy for Duration

source§

impl Eq for Duration

source§

impl StructuralEq for Duration

source§

impl StructuralPartialEq for Duration

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+
§

type Output = Instant

The resulting type after applying the + operator.
source§

impl Add for Duration

§

type Output = Duration

The resulting type after applying the + operator.
source§

fn add(self, rhs: Duration) -> Duration

Performs the + operation. Read more
1.9.0 · source§

impl AddAssign<Duration> for Instant

source§

fn add_assign(&mut self, other: Duration)

Performs the += operation. Read more
1.9.0 · source§

impl AddAssign for Duration

source§

fn add_assign(&mut self, rhs: Duration)

Performs the += operation. Read more
source§

impl Clone for Duration

source§

fn clone(&self) -> Duration

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
1.27.0 · source§

impl Debug for Duration

source§

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

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

impl Default for Duration

source§

fn default() -> Duration

Returns the “default value” for a type. Read more
source§

impl Div<u32> for Duration

§

type Output = Duration

The resulting type after applying the / operator.
source§

fn div(self, rhs: u32) -> Duration

Performs the / operation. Read more
1.9.0 · source§

impl DivAssign<u32> for Duration

source§

fn div_assign(&mut self, rhs: u32)

Performs the /= operation. Read more
source§

impl Hash for Duration

source§

fn hash<__H>(&self, state: &mut __H)
where + __H: Hasher,

Feeds this value into the given Hasher. Read more
source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Mul<u32> for Duration

§

type Output = Duration

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u32) -> Duration

Performs the * operation. Read more
1.9.0 · source§

impl MulAssign<u32> for Duration

source§

fn mul_assign(&mut self, rhs: u32)

Performs the *= operation. Read more
source§

impl Ord for Duration

source§

fn cmp(&self, other: &Duration) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Duration

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Duration

source§

fn partial_cmp(&self, other: &Duration) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
1.8.0 · source§

impl Sub<Duration> for Instant

§

type Output = Instant

The resulting type after applying the - operator.
source§

fn sub(self, other: Duration) -> Instant

Performs the - operation. Read more
source§

impl Sub for Duration

§

type Output = Duration

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Duration) -> Duration

Performs the - operation. Read more
1.9.0 · source§

impl SubAssign<Duration> for Instant

source§

fn sub_assign(&mut self, other: Duration)

Performs the -= operation. Read more
1.9.0 · source§

impl SubAssign for Duration

source§

fn sub_assign(&mut self, rhs: Duration)

Performs the -= operation. Read more
1.16.0 · source§

impl<'a> Sum<&'a Duration> for Duration

source§

fn sum<I>(iter: I) -> Duration
where + I: Iterator<Item = &'a Duration>,

Method which takes an iterator and generates Self from the elements by +“summing up” the items.
1.16.0 · source§

impl Sum for Duration

source§

fn sum<I>(iter: I) -> Duration
where + I: Iterator<Item = Duration>,

Method which takes an iterator and generates Self from the elements by +“summing up” the items.
source§

impl Copy for Duration

source§

impl Eq for Duration

source§

impl StructuralEq for Duration

source§

impl StructuralPartialEq for Duration

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
§

impl<Q, K> Comparable<K> for Q
where + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for Twhere - T: Clone,

§

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 Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<M> Measure for Mwhere - M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone,

source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<M> Measure for M
where + M: Debug + PartialOrd + Add<Output = M> + Default + Clone,

source§

impl<N> NodeTrait for N
where + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/reactor_rt/struct.EventTag.html b/reactor_rt/struct.EventTag.html index c51f5cd3..b04d1c30 100644 --- a/reactor_rt/struct.EventTag.html +++ b/reactor_rt/struct.EventTag.html @@ -1,4 +1,5 @@ -EventTag in reactor_rt - Rust

Struct reactor_rt::EventTag

source ·
pub struct EventTag {
+EventTag in reactor_rt - Rust
+    

Struct reactor_rt::EventTag

source ·
pub struct EventTag {
     pub offset_from_t0: Duration,
     pub microstep: MicroStep,
 }
Expand description

The tag of an event.

@@ -9,42 +10,46 @@ of the tag.

Use the tag! macro to create this struct with convenient syntax.

-

Fields§

§offset_from_t0: Duration

The time offset from the origin of the logical timeline. +

Fields§

§offset_from_t0: Duration

The time offset from the origin of the logical timeline. Knowing the start time of the application is necessary to -convert this to an absolute Instant (see Self::to_logical_time).

-
§microstep: MicroStep

The microstep of this tag.

-

Implementations§

source§

impl EventTag

source

pub const ORIGIN: EventTag = _

The tag of the startup event.

-
source

pub fn to_logical_time(&self, t0: Instant) -> Instant

Returns the logical instant for this tag, using the +convert this to an absolute Instant (see Self::to_logical_time).

+
§microstep: MicroStep

The microstep of this tag.

+

Implementations§

source§

impl EventTag

source

pub const ORIGIN: EventTag = _

The tag of the startup event.

+
source

pub fn to_logical_time(&self, t0: Instant) -> Instant

Returns the logical instant for this tag, using the initial time t0.

-
source

pub fn duration_since_start(&self) -> Duration

Returns the amount of time elapsed since the start +

source

pub fn duration_since_start(&self) -> Duration

Returns the amount of time elapsed since the start of the app.

assert_eq!(tag1.duration_since_start(), tag1.to_logical_time(t0) - t0)
-
source

pub fn microstep(&self) -> MicroStep

Returns the microstep of this tag.

-
source

pub fn offset(offset_from_t0: Duration, microstep: u32) -> Self

Create a new tag from its offset from t0 and a microstep. +

source

pub fn microstep(&self) -> MicroStep

Returns the microstep of this tag.

+
source

pub fn offset(offset_from_t0: Duration, microstep: u32) -> Self

Create a new tag from its offset from t0 and a microstep. Use the tag! macro for more convenient syntax.

-

Trait Implementations§

source§

impl Clone for EventTag

source§

fn clone(&self) -> EventTag

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for EventTag

source§

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

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

impl Display for EventTag

source§

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

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

impl Hash for EventTag

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for EventTag

source§

fn cmp(&self, other: &EventTag) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<EventTag> for EventTag

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<EventTag> for EventTag

source§

fn partial_cmp(&self, other: &EventTag) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Copy for EventTag

source§

impl Eq for EventTag

source§

impl StructuralEq for EventTag

source§

impl StructuralPartialEq for EventTag

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Clone for EventTag

source§

fn clone(&self) -> EventTag

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for EventTag

source§

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

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

impl Display for EventTag

source§

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

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

impl Hash for EventTag

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for EventTag

source§

fn cmp(&self, other: &EventTag) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for EventTag

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for EventTag

source§

fn partial_cmp(&self, other: &EventTag) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for EventTag

source§

impl Eq for EventTag

source§

impl StructuralEq for EventTag

source§

impl StructuralPartialEq for EventTag

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
§

impl<Q, K> Comparable<K> for Q
where + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for Twhere - T: Clone,

§

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> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<N> NodeTrait for N
where + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/reactor_rt/struct.GlobalReactionId.html b/reactor_rt/struct.GlobalReactionId.html index 77b6d211..9a498b77 100644 --- a/reactor_rt/struct.GlobalReactionId.html +++ b/reactor_rt/struct.GlobalReactionId.html @@ -1,26 +1,31 @@ -GlobalReactionId in reactor_rt - Rust
pub struct GlobalReactionId(_);
Expand description

Global identifier for a reaction.

-

Implementations§

source§

impl GlobalReactionId

source

pub fn new(container: ReactorId, local: LocalReactionId) -> Self

Trait Implementations§

source§

impl Clone for GlobalReactionId

source§

fn clone(&self) -> GlobalReactionId

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for GlobalReactionId

source§

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

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

impl Display for GlobalReactionId

source§

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

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

impl Hash for GlobalReactionId

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for GlobalReactionId

source§

fn cmp(&self, other: &GlobalReactionId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<GlobalReactionId> for GlobalReactionId

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<GlobalReactionId> for GlobalReactionId

source§

fn partial_cmp(&self, other: &GlobalReactionId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Copy for GlobalReactionId

source§

impl Eq for GlobalReactionId

source§

impl StructuralEq for GlobalReactionId

source§

impl StructuralPartialEq for GlobalReactionId

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+GlobalReactionId in reactor_rt - Rust +
pub struct GlobalReactionId(/* private fields */);
Expand description

Global identifier for a reaction.

+

Implementations§

source§

impl GlobalReactionId

source

pub fn new(container: ReactorId, local: LocalReactionId) -> Self

Trait Implementations§

source§

impl Clone for GlobalReactionId

source§

fn clone(&self) -> GlobalReactionId

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for GlobalReactionId

source§

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

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

impl Display for GlobalReactionId

source§

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

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

impl Hash for GlobalReactionId

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for GlobalReactionId

source§

fn cmp(&self, other: &GlobalReactionId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for GlobalReactionId

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for GlobalReactionId

source§

fn partial_cmp(&self, other: &GlobalReactionId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for GlobalReactionId

source§

impl Eq for GlobalReactionId

source§

impl StructuralEq for GlobalReactionId

source§

impl StructuralPartialEq for GlobalReactionId

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
§

impl<Q, K> Comparable<K> for Q
where + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for Twhere - T: Clone,

§

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> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<N> NodeTrait for N
where + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/reactor_rt/struct.Instant.html b/reactor_rt/struct.Instant.html index 67afd020..5a16fde7 100644 --- a/reactor_rt/struct.Instant.html +++ b/reactor_rt/struct.Instant.html @@ -1,4 +1,5 @@ -Instant in reactor_rt - Rust

Struct reactor_rt::Instant

1.8.0 · source ·
pub struct Instant(_);
Expand description

A measurement of a monotonically nondecreasing clock. +Instant in reactor_rt - Rust

+

Struct reactor_rt::Instant

1.8.0 · source ·
pub struct Instant(/* private fields */);
Expand description

A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.

Instants are always guaranteed, barring platform bugs, to be no less than any previously measured instant when created, and are often useful for tasks such as measuring @@ -7,7 +8,9 @@ words, each tick of the underlying clock might not be the same length (e.g. some seconds may be longer than others). An instant may jump forwards or experience time dilation (slow down or speed up), but it will never go -backwards.

+backwards. +As part of this non-guarantee it is also not specified whether system suspends count as +elapsed time or not. The behavior varies across platforms and rust versions.

Instants are opaque types that can only be compared to one another. There is no method to get “the number of seconds” from an instant. Instead, it only allows measuring the duration between two instants (or comparing two @@ -24,8 +27,8 @@ // we sleep for 2 seconds sleep(Duration::new(2, 0)); - // it prints '2' - println!("{}", now.elapsed().as_secs()); + // it prints '2' + println!("{}", now.elapsed().as_secs()); }

OS-specific behaviors

An Instant is a wrapper around system-specific types and it may behave @@ -37,17 +40,17 @@

OS-specific beha let now = Instant::now(); let max_seconds = u64::MAX / 1_000_000_000; let duration = Duration::new(max_seconds, 0); -println!("{:?}", now + duration);

+println!("{:?}", now + duration);

Underlying System calls

-

The following system calls are currently being used by now() to find out +

The following system calls are currently being used by now() to find out the current time:

@@ -66,12 +69,12 @@

Monotonicity

where monotonicity is violated, or Instants are subtracted in the wrong order.

This workaround obscures programming errors where earlier and later instants are accidentally swapped. For this reason future rust versions may reintroduce panics.

-

Implementations§

source§

impl Instant

source

pub fn now() -> Instant

Returns an instant corresponding to “now”.

+

Implementations§

source§

impl Instant

source

pub fn now() -> Instant

Returns an instant corresponding to “now”.

Examples
use std::time::Instant;
 
 let now = Instant::now();
-
source

pub fn duration_since(&self, earlier: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, +

source

pub fn duration_since(&self, earlier: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.

Panics

Previous rust versions panicked when earlier was later than self. Currently this @@ -84,9 +87,9 @@

Examples
let now = Instant::now(); sleep(Duration::new(1, 0)); let new_now = Instant::now(); -println!("{:?}", new_now.duration_since(now)); -println!("{:?}", now.duration_since(new_now)); // 0ns
-
1.39.0 · source

pub fn checked_duration_since(&self, earlier: Instant) -> Option<Duration>

Returns the amount of time elapsed from another instant to this one, +println!("{:?}", new_now.duration_since(now)); +println!("{:?}", now.duration_since(new_now)); // 0ns

+
1.39.0 · source

pub fn checked_duration_since(&self, earlier: Instant) -> Option<Duration>

Returns the amount of time elapsed from another instant to this one, or None if that instant is later than this one.

Due to monotonicity bugs, even under correct logical ordering of the passed Instants, this method can return None.

@@ -97,9 +100,9 @@
Examples
let now = Instant::now(); sleep(Duration::new(1, 0)); let new_now = Instant::now(); -println!("{:?}", new_now.checked_duration_since(now)); -println!("{:?}", now.checked_duration_since(new_now)); // None
-
1.39.0 · source

pub fn saturating_duration_since(&self, earlier: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, +println!("{:?}", new_now.checked_duration_since(now)); +println!("{:?}", now.checked_duration_since(new_now)); // None

+
1.39.0 · source

pub fn saturating_duration_since(&self, earlier: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.

Examples
use std::time::{Duration, Instant};
@@ -108,9 +111,9 @@ 
Examples
let now = Instant::now(); sleep(Duration::new(1, 0)); let new_now = Instant::now(); -println!("{:?}", new_now.saturating_duration_since(now)); -println!("{:?}", now.saturating_duration_since(new_now)); // 0ns
-
source

pub fn elapsed(&self) -> Duration

Returns the amount of time elapsed since this instant.

+println!("{:?}", new_now.saturating_duration_since(now)); +println!("{:?}", now.saturating_duration_since(new_now)); // 0ns
+
source

pub fn elapsed(&self) -> Duration

Returns the amount of time elapsed since this instant.

Panics

Previous rust versions panicked when the current time was earlier than self. Currently this method returns a Duration of zero in that case. Future versions may reintroduce the panic. @@ -123,43 +126,47 @@

Examples
let three_secs = Duration::from_secs(3); sleep(three_secs); assert!(instant.elapsed() >= three_secs);
-
1.34.0 · source

pub fn checked_add(&self, duration: Duration) -> Option<Instant>

Returns Some(t) where t is the time self + duration if t can be represented as +

1.34.0 · source

pub fn checked_add(&self, duration: Duration) -> Option<Instant>

Returns Some(t) where t is the time self + duration if t can be represented as Instant (which means it’s inside the bounds of the underlying data structure), None otherwise.

-
1.34.0 · source

pub fn checked_sub(&self, duration: Duration) -> Option<Instant>

Returns Some(t) where t is the time self - duration if t can be represented as +

1.34.0 · source

pub fn checked_sub(&self, duration: Duration) -> Option<Instant>

Returns Some(t) where t is the time self - duration if t can be represented as Instant (which means it’s inside the bounds of the underlying data structure), None otherwise.

-

Trait Implementations§

Trait Implementations§

source§

impl Add<Duration> for Instant

source§

fn add(self, other: Duration) -> Instant

Panics

This function may panic if the resulting point in time cannot be represented by the underlying data structure. See Instant::checked_add for a version without panic.

-
§

type Output = Instant

The resulting type after applying the + operator.
1.9.0 · source§

impl AddAssign<Duration> for Instant

source§

fn add_assign(&mut self, other: Duration)

Performs the += operation. Read more
source§

impl Clone for Instant

source§

fn clone(&self) -> Instant

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Instant

source§

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

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

impl Hash for Instant

source§

fn hash<__H>(&self, state: &mut __H)where - __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Instant

source§

fn cmp(&self, other: &Instant) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Instant> for Instant

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Instant> for Instant

source§

fn partial_cmp(&self, other: &Instant) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Sub<Duration> for Instant

§

type Output = Instant

The resulting type after applying the - operator.
source§

fn sub(self, other: Duration) -> Instant

Performs the - operation. Read more
source§

impl Sub<Instant> for Instant

source§

fn sub(self, other: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, +

§

type Output = Instant

The resulting type after applying the + operator.
1.9.0 · source§

impl AddAssign<Duration> for Instant

source§

fn add_assign(&mut self, other: Duration)

Performs the += operation. Read more
source§

impl Clone for Instant

source§

fn clone(&self) -> Instant

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Instant

source§

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

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

impl Hash for Instant

source§

fn hash<__H>(&self, state: &mut __H)
where + __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Instant

source§

fn cmp(&self, other: &Instant) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Instant

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Instant

source§

fn partial_cmp(&self, other: &Instant) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Sub<Duration> for Instant

§

type Output = Instant

The resulting type after applying the - operator.
source§

fn sub(self, other: Duration) -> Instant

Performs the - operation. Read more
source§

impl Sub for Instant

source§

fn sub(self, other: Instant) -> Duration

Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.

-
Panics
+
Panics

Previous rust versions panicked when other was later than self. Currently this method saturates. Future versions may reintroduce the panic in some circumstances. See Monotonicity.

-
§

type Output = Duration

The resulting type after applying the - operator.
1.9.0 · source§

impl SubAssign<Duration> for Instant

source§

fn sub_assign(&mut self, other: Duration)

Performs the -= operation. Read more
source§

impl Copy for Instant

source§

impl Eq for Instant

source§

impl StructuralEq for Instant

source§

impl StructuralPartialEq for Instant

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+
§

type Output = Duration

The resulting type after applying the - operator.
1.9.0 · source§

impl SubAssign<Duration> for Instant

source§

fn sub_assign(&mut self, other: Duration)

Performs the -= operation. Read more
source§

impl Copy for Instant

source§

impl Eq for Instant

source§

impl StructuralEq for Instant

source§

impl StructuralPartialEq for Instant

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
§

impl<Q, K> Comparable<K> for Q
where + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for Twhere - T: Clone,

§

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 Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<N> NodeTrait for N
where + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/reactor_rt/struct.LocalReactionId.html b/reactor_rt/struct.LocalReactionId.html index 53bf5973..72f7d79d 100644 --- a/reactor_rt/struct.LocalReactionId.html +++ b/reactor_rt/struct.LocalReactionId.html @@ -1,36 +1,44 @@ -LocalReactionId in reactor_rt - Rust
#[repr(transparent)]
pub struct LocalReactionId(_);
Expand description

ID of a reaction local to its containing reactor.

-

Implementations§

source§

impl LocalReactionId

source

pub const fn new(u: u16) -> Self

source

pub const fn raw(self) -> u16

Trait Implementations§

source§

impl Clone for LocalReactionId

source§

fn clone(&self) -> LocalReactionId

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for LocalReactionId

source§

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

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

impl Display for LocalReactionId

source§

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

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

impl Hash for LocalReactionId

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Idx for LocalReactionId

source§

fn from_usize(idx: usize) -> Self

Construct an Index from a usize. This is equivalent to From. Read more
source§

fn index(self) -> usize

Get the underlying index. This is equivalent to Into
source§

impl Ord for LocalReactionId

source§

fn cmp(&self, other: &LocalReactionId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<LocalReactionId> for LocalReactionId

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<LocalReactionId> for LocalReactionId

source§

fn partial_cmp(&self, other: &LocalReactionId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Copy for LocalReactionId

source§

impl Eq for LocalReactionId

source§

impl StructuralEq for LocalReactionId

source§

impl StructuralPartialEq for LocalReactionId

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<I, T> IdxSliceIndex<I, T> for Iwhere - I: Idx,

§

type Output = T

§

fn get( +LocalReactionId in reactor_rt - Rust +
pub struct LocalReactionId(/* private fields */);
Expand description

ID of a reaction local to its containing reactor.

+

Implementations§

source§

impl LocalReactionId

source

pub const fn new(u: u16) -> Self

source

pub const fn raw(self) -> u16

Trait Implementations§

source§

impl Clone for LocalReactionId

source§

fn clone(&self) -> LocalReactionId

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for LocalReactionId

source§

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

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

impl Display for LocalReactionId

source§

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

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

impl Hash for LocalReactionId

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Idx for LocalReactionId

source§

fn from_usize(idx: usize) -> Self

Construct an Index from a usize. This is equivalent to From. Read more
source§

fn index(self) -> usize

Get the underlying index. This is equivalent to Into
source§

impl Ord for LocalReactionId

source§

fn cmp(&self, other: &LocalReactionId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for LocalReactionId

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for LocalReactionId

source§

fn partial_cmp(&self, other: &LocalReactionId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for LocalReactionId

source§

impl Eq for LocalReactionId

source§

impl StructuralEq for LocalReactionId

source§

impl StructuralPartialEq for LocalReactionId

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
§

impl<Q, K> Comparable<K> for Q
where + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<I, T> IdxSliceIndex<I, T> for I
where + I: Idx,

§

type Output = T

§

fn get( self, - slice: &IndexSlice<I, [T]> -) -> Option<&<I as IdxSliceIndex<I, T>>::Output>

§

fn get_mut( + slice: &IndexSlice<I, [T]> +) -> Option<&<I as IdxSliceIndex<I, T>>::Output>

§

fn get_mut( self, - slice: &mut IndexSlice<I, [T]> -) -> Option<&mut <I as IdxSliceIndex<I, T>>::Output>

§

fn index(self, slice: &IndexSlice<I, [T]>) -> &<I as IdxSliceIndex<I, T>>::Output

§

fn index_mut( + slice: &mut IndexSlice<I, [T]> +) -> Option<&mut <I as IdxSliceIndex<I, T>>::Output>

§

fn index( self, - slice: &mut IndexSlice<I, [T]> -) -> &mut <I as IdxSliceIndex<I, T>>::Output

source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+ slice: &IndexSlice<I, [T]> +) -> &<I as IdxSliceIndex<I, T>>::Output

§

fn index_mut( + self, + slice: &mut IndexSlice<I, [T]> +) -> &mut <I as IdxSliceIndex<I, T>>::Output

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> ToOwned for Twhere - T: Clone,

§

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> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<N> NodeTrait for N
where + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/reactor_rt/struct.LogicalAction.html b/reactor_rt/struct.LogicalAction.html index 8b4570ae..0224b71f 100644 --- a/reactor_rt/struct.LogicalAction.html +++ b/reactor_rt/struct.LogicalAction.html @@ -1,27 +1,28 @@ -LogicalAction in reactor_rt - Rust
pub struct LogicalAction<T: Sync>(_);
Expand description

A logical action.

-

Trait Implementations§

source§

impl<T: Sync> ReactionTrigger<T> for LogicalAction<T>

source§

fn is_present(&self, now: &EventTag, start: &Instant) -> bool

Returns whether the trigger is present, given that -the current logical time is the parameter.
source§

fn get_value(&self, now: &EventTag, start: &Instant) -> Option<T>where - T: Copy,

Copies the value out, if it is present. Whether a value +LogicalAction in reactor_rt - Rust +
pub struct LogicalAction<T: Sync>(/* private fields */);
Expand description

A logical action.

+

Trait Implementations§

source§

impl<T: Sync> ReactionTrigger<T> for LogicalAction<T>

source§

fn is_present(&self, now: &EventTag, start: &Instant) -> bool

Returns whether the trigger is present, given that +the current logical time is the parameter.
source§

fn get_value(&self, now: &EventTag, start: &Instant) -> Option<T>
where + T: Copy,

Copies the value out, if it is present. Whether a value is present is not in general the same thing as whether this trigger -Self::is_present. See crate::ReactionCtx::get.
source§

fn use_value_ref<O>( +Self::is_present. See crate::ReactionCtx::get.

source§

fn use_value_ref<O>( &self, - now: &EventTag, + now: &EventTag, start: &Instant, - action: impl FnOnce(Option<&T>) -> O + action: impl FnOnce(Option<&T>) -> O ) -> O

Execute an action using the current value of this trigger. -The closure is called even if the value is absent (with a None -argument).
source§

impl<T: Sync> SchedulableAsAction<T> for LogicalAction<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for LogicalAction<T>where - T: RefUnwindSafe,

§

impl<T> Send for LogicalAction<T>where - T: Send,

§

impl<T> Sync for LogicalAction<T>

§

impl<T> Unpin for LogicalAction<T>where - T: Unpin,

§

impl<T> UnwindSafe for LogicalAction<T>where - T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+The closure is called even if the value is absent (with a None +argument).
source§

impl<T: Sync> SchedulableAsAction<T> for LogicalAction<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for LogicalAction<T>
where + T: RefUnwindSafe,

§

impl<T> Send for LogicalAction<T>
where + T: Send,

§

impl<T> Sync for LogicalAction<T>

§

impl<T> Unpin for LogicalAction<T>
where + T: Unpin,

§

impl<T> UnwindSafe for LogicalAction<T>
where + T: UnwindSafe,

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/struct.MicroStep.html b/reactor_rt/struct.MicroStep.html index 7f65124f..e03c93fb 100644 --- a/reactor_rt/struct.MicroStep.html +++ b/reactor_rt/struct.MicroStep.html @@ -1,26 +1,31 @@ -MicroStep in reactor_rt - Rust

Struct reactor_rt::MicroStep

source ·
pub struct MicroStep(_);
Expand description

Type of the microsteps of an EventTag.

-

Implementations§

source§

impl MicroStep

source

pub const ZERO: MicroStep = _

source

pub fn new(u: u32) -> Self

Trait Implementations§

source§

impl Add<u32> for MicroStep

§

type Output = MicroStep

The resulting type after applying the + operator.
source§

fn add(self, rhs: u32) -> Self::Output

Performs the + operation. Read more
source§

impl Clone for MicroStep

source§

fn clone(&self) -> MicroStep

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for MicroStep

source§

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

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

impl Display for MicroStep

source§

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

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

impl Hash for MicroStep

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for MicroStep

source§

fn cmp(&self, other: &MicroStep) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<MicroStep> for MicroStep

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<MicroStep> for MicroStep

source§

fn partial_cmp(&self, other: &MicroStep) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Copy for MicroStep

source§

impl Eq for MicroStep

source§

impl StructuralEq for MicroStep

source§

impl StructuralPartialEq for MicroStep

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+MicroStep in reactor_rt - Rust +

Struct reactor_rt::MicroStep

source ·
pub struct MicroStep(/* private fields */);
Expand description

Type of the microsteps of an EventTag.

+

Implementations§

source§

impl MicroStep

source

pub const ZERO: MicroStep = _

source

pub fn new(u: u32) -> Self

Trait Implementations§

source§

impl Add<u32> for MicroStep

§

type Output = MicroStep

The resulting type after applying the + operator.
source§

fn add(self, rhs: u32) -> Self::Output

Performs the + operation. Read more
source§

impl Clone for MicroStep

source§

fn clone(&self) -> MicroStep

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for MicroStep

source§

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

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

impl Display for MicroStep

source§

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

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

impl Hash for MicroStep

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for MicroStep

source§

fn cmp(&self, other: &MicroStep) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for MicroStep

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for MicroStep

source§

fn partial_cmp(&self, other: &MicroStep) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for MicroStep

source§

impl Eq for MicroStep

source§

impl StructuralEq for MicroStep

source§

impl StructuralPartialEq for MicroStep

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
§

impl<Q, K> Comparable<K> for Q
where + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for Twhere - T: Clone,

§

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> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<N> NodeTrait for N
where + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/reactor_rt/struct.Multiport.html b/reactor_rt/struct.Multiport.html index 89541b4f..c64291fc 100644 --- a/reactor_rt/struct.Multiport.html +++ b/reactor_rt/struct.Multiport.html @@ -1,37 +1,38 @@ -Multiport in reactor_rt - Rust

Struct reactor_rt::Multiport

source ·
pub struct Multiport<T: Sync> { /* private fields */ }
Expand description

A multiport is a vector of independent ports (its channels) +Multiport in reactor_rt - Rust

+

Struct reactor_rt::Multiport

source ·
pub struct Multiport<T: Sync> { /* private fields */ }
Expand description

A multiport is a vector of independent ports (its channels) Multiports have special Lingua Franca syntax, similar to reactor banks.

-

Implementations§

source§

impl<T: Sync> Multiport<T>

source

pub fn len(&self) -> usize

Returns the number of channels.

-
source

pub fn is_empty(&self) -> bool

Returns true if this multiport is empty.

-
source

pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Port<T>>

Iterate over the multiport and return mutable references to individual channels.

-
source

pub fn iter(&self) -> impl Iterator<Item = &Port<T>>

Iterate over the channels of this multiport. Returns read-only +

Implementations§

source§

impl<T: Sync> Multiport<T>

source

pub fn len(&self) -> usize

Returns the number of channels.

+
source

pub fn is_empty(&self) -> bool

Returns true if this multiport is empty.

+
source

pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Port<T>>

Iterate over the multiport and return mutable references to individual channels.

+
source

pub fn iter(&self) -> impl Iterator<Item = &Port<T>>

Iterate over the channels of this multiport. Returns read-only references to individual ports.

-
source

pub fn enumerate_set(&self) -> impl Iterator<Item = (usize, &Port<T>)>

Iterate over only those channels that are set (have a value). +

source

pub fn enumerate_set(&self) -> impl Iterator<Item = (usize, &Port<T>)>

Iterate over only those channels that are set (have a value). Returns a tuple with their index (not necessarily contiguous).

-
source

pub fn iterate_set(&self) -> impl Iterator<Item = &Port<T>>

Iterate over only those channels that are set (have a value). +

source

pub fn iterate_set(&self) -> impl Iterator<Item = &Port<T>>

Iterate over only those channels that are set (have a value). The returned ports are not necessarily contiguous. See -Self::enumerate_set to get access to their index.

-
source

pub fn iterate_values(&self) -> impl Iterator<Item = T> + '_where - T: Copy,

Iterate over only those channels that are set (have a value), +Self::enumerate_set to get access to their index.

+
source

pub fn iterate_values(&self) -> impl Iterator<Item = T> + '_
where + T: Copy,

Iterate over only those channels that are set (have a value), and return a copy of the value. The returned ports are not necessarily contiguous. See -Self::enumerate_values to get access to their index.

-
source

pub fn iterate_values_ref(&self) -> impl Iterator<Item = &T> + '_

Iterate over only those ports that are set (have a value), +Self::enumerate_values to get access to their index.

+
source

pub fn iterate_values_ref(&self) -> impl Iterator<Item = &T> + '_

Iterate over only those ports that are set (have a value), and return a reference to the value. The returned ports are not necessarily contiguous. See -Self::enumerate_values to get access to their index.

-
source

pub fn enumerate_values(&self) -> impl Iterator<Item = (usize, T)> + '_where - T: Copy,

Iterate over only those channels that are set (have a value), +Self::enumerate_values to get access to their index.

+
source

pub fn enumerate_values(&self) -> impl Iterator<Item = (usize, T)> + '_
where + T: Copy,

Iterate over only those channels that are set (have a value), yielding a tuple with their index in the bank and a copy of the value.

-
source

pub fn enumerate_values_ref(&self) -> impl Iterator<Item = (usize, &T)> + '_

Iterate over only those channels that are set (have a value), +

source

pub fn enumerate_values_ref(&self) -> impl Iterator<Item = (usize, &T)> + '_

Iterate over only those channels that are set (have a value), yielding a tuple with their index in the bank and a reference to the value.

-

Trait Implementations§

source§

impl<T: Sync> Index<usize> for Multiport<T>

§

type Output = Port<T>

The returned type after indexing.
source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T: Sync> IndexMut<usize> for Multiport<T>

source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<'a, T: Sync> IntoIterator for &'a Multiport<T>

§

type Item = &'a Port<T>

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, Port<T>>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, T: Sync> IntoIterator for &'a mut Multiport<T>

§

type Item = &'a mut Port<T>

The type of the elements being iterated over.
§

type IntoIter = IterMut<'a, Port<T>>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for Multiport<T>

§

impl<T> !Send for Multiport<T>

§

impl<T> !Sync for Multiport<T>

§

impl<T> Unpin for Multiport<T>

§

impl<T> !UnwindSafe for Multiport<T>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl<T: Sync> Index<usize> for Multiport<T>

§

type Output = Port<T>

The returned type after indexing.
source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T: Sync> IndexMut<usize> for Multiport<T>

source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<'a, T: Sync> IntoIterator for &'a Multiport<T>

§

type Item = &'a Port<T>

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, Port<T>>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, T: Sync> IntoIterator for &'a mut Multiport<T>

§

type Item = &'a mut Port<T>

The type of the elements being iterated over.
§

type IntoIter = IterMut<'a, Port<T>>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for Multiport<T>

§

impl<T> !Send for Multiport<T>

§

impl<T> !Sync for Multiport<T>

§

impl<T> Unpin for Multiport<T>

§

impl<T> !UnwindSafe for Multiport<T>

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/struct.PhysicalAction.html b/reactor_rt/struct.PhysicalAction.html index 63a65e67..a2d7404b 100644 --- a/reactor_rt/struct.PhysicalAction.html +++ b/reactor_rt/struct.PhysicalAction.html @@ -1,18 +1,19 @@ -PhysicalAction in reactor_rt - Rust
pub struct PhysicalAction<T: Sync>(_);
Expand description

A physical action. Physical actions may only be used with -the API of AsyncCtx. -See ReactionCtx::spawn_physical_thread.

-

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for PhysicalAction<T>where - T: RefUnwindSafe,

§

impl<T> Send for PhysicalAction<T>where - T: Send,

§

impl<T> Sync for PhysicalAction<T>

§

impl<T> Unpin for PhysicalAction<T>where - T: Unpin,

§

impl<T> UnwindSafe for PhysicalAction<T>where - T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+PhysicalAction in reactor_rt - Rust +
pub struct PhysicalAction<T: Sync>(/* private fields */);
Expand description

A physical action. Physical actions may only be used with +the API of AsyncCtx. +See ReactionCtx::spawn_physical_thread.

+

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for PhysicalAction<T>
where + T: RefUnwindSafe,

§

impl<T> Send for PhysicalAction<T>
where + T: Send,

§

impl<T> Sync for PhysicalAction<T>

§

impl<T> Unpin for PhysicalAction<T>
where + T: Unpin,

§

impl<T> UnwindSafe for PhysicalAction<T>
where + T: UnwindSafe,

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/struct.PhysicalActionRef.html b/reactor_rt/struct.PhysicalActionRef.html index bad98510..aa59c906 100644 --- a/reactor_rt/struct.PhysicalActionRef.html +++ b/reactor_rt/struct.PhysicalActionRef.html @@ -1,30 +1,31 @@ -PhysicalActionRef in reactor_rt - Rust
pub struct PhysicalActionRef<T: Sync>(_);
Expand description

A reference to a physical action. This thing is cloneable +PhysicalActionRef in reactor_rt - Rust

+
pub struct PhysicalActionRef<T: Sync>(/* private fields */);
Expand description

A reference to a physical action. This thing is cloneable and can be sent to async threads. The contained action reference is unique and protected by a lock. All operations on the action are

-

See crate::ReactionCtx::spawn_physical_thread.

-

Trait Implementations§

source§

impl<T: Clone + Sync> Clone for PhysicalActionRef<T>

source§

fn clone(&self) -> PhysicalActionRef<T>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<T: Sync> ReactionTrigger<T> for PhysicalActionRef<T>

source§

fn is_present(&self, now: &EventTag, start: &Instant) -> bool

Returns whether the trigger is present, given that -the current logical time is the parameter.
source§

fn get_value(&self, now: &EventTag, start: &Instant) -> Option<T>where - T: Copy,

Copies the value out, if it is present. Whether a value +

See crate::ReactionCtx::spawn_physical_thread.

+

Trait Implementations§

source§

impl<T: Clone + Sync> Clone for PhysicalActionRef<T>

source§

fn clone(&self) -> PhysicalActionRef<T>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<T: Sync> ReactionTrigger<T> for PhysicalActionRef<T>

source§

fn is_present(&self, now: &EventTag, start: &Instant) -> bool

Returns whether the trigger is present, given that +the current logical time is the parameter.
source§

fn get_value(&self, now: &EventTag, start: &Instant) -> Option<T>
where + T: Copy,

Copies the value out, if it is present. Whether a value is present is not in general the same thing as whether this trigger -Self::is_present. See crate::ReactionCtx::get.
source§

fn use_value_ref<O>( +Self::is_present. See crate::ReactionCtx::get.

source§

fn use_value_ref<O>( &self, - now: &EventTag, + now: &EventTag, start: &Instant, - action: impl FnOnce(Option<&T>) -> O + action: impl FnOnce(Option<&T>) -> O ) -> O

Execute an action using the current value of this trigger. -The closure is called even if the value is absent (with a None -argument).
source§

impl<T: Sync> SchedulableAsAction<T> for PhysicalActionRef<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for PhysicalActionRef<T>

§

impl<T> Send for PhysicalActionRef<T>where - T: Send,

§

impl<T> Sync for PhysicalActionRef<T>where - T: Send,

§

impl<T> Unpin for PhysicalActionRef<T>

§

impl<T> UnwindSafe for PhysicalActionRef<T>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+The closure is called even if the value is absent (with a None +argument).
source§

impl<T: Sync> SchedulableAsAction<T> for PhysicalActionRef<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for PhysicalActionRef<T>

§

impl<T> Send for PhysicalActionRef<T>
where + T: Send,

§

impl<T> Sync for PhysicalActionRef<T>
where + T: Send,

§

impl<T> Unpin for PhysicalActionRef<T>

§

impl<T> UnwindSafe for PhysicalActionRef<T>

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> 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> ToOwned for Twhere - T: Clone,

§

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 Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/struct.Port.html b/reactor_rt/struct.Port.html index 7743bfc5..88bbacdb 100644 --- a/reactor_rt/struct.Port.html +++ b/reactor_rt/struct.Port.html @@ -1,35 +1,36 @@ -Port in reactor_rt - Rust

Struct reactor_rt::Port

source ·
pub struct Port<T: Sync> { /* private fields */ }
Expand description

Represents a port, which carries values of type T. +Port in reactor_rt - Rust

+

Struct reactor_rt::Port

source ·
pub struct Port<T: Sync> { /* private fields */ }
Expand description

Represents a port, which carries values of type T. Ports reify the data inputs and outputs of a reactor.

They may be bound to another port, in which case the upstream port forwards all values to the output port (logically instantaneously). A port may have only one upstream binding.

-

Output ports may also be explicitly set +

Output ports may also be explicitly set within a reaction, in which case they may not have an upstream port binding.

Those structural constraints are trusted to have been verified by the code generator. If necessary we may be able to add conditional compilation flags that enable runtime checks.

-

Trait Implementations§

source§

impl<T: Sync> ReactionTrigger<T> for Port<T>

source§

fn is_present(&self, _now: &EventTag, _start: &Instant) -> bool

Returns whether the trigger is present, given that -the current logical time is the parameter.
source§

fn get_value(&self, _now: &EventTag, _start: &Instant) -> Option<T>where - T: Copy,

Copies the value out, if it is present. Whether a value +

Trait Implementations§

source§

impl<T: Sync> ReactionTrigger<T> for Port<T>

source§

fn is_present(&self, _now: &EventTag, _start: &Instant) -> bool

Returns whether the trigger is present, given that +the current logical time is the parameter.
source§

fn get_value(&self, _now: &EventTag, _start: &Instant) -> Option<T>
where + T: Copy,

Copies the value out, if it is present. Whether a value is present is not in general the same thing as whether this trigger -Self::is_present. See crate::ReactionCtx::get.
source§

fn use_value_ref<O>( +Self::is_present. See crate::ReactionCtx::get.

source§

fn use_value_ref<O>( &self, - _now: &EventTag, + _now: &EventTag, _start: &Instant, - action: impl FnOnce(Option<&T>) -> O + action: impl FnOnce(Option<&T>) -> O ) -> O

Execute an action using the current value of this trigger. -The closure is called even if the value is absent (with a None -argument).

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for Port<T>

§

impl<T> !Send for Port<T>

§

impl<T> !Sync for Port<T>

§

impl<T> Unpin for Port<T>

§

impl<T> !UnwindSafe for Port<T>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+The closure is called even if the value is absent (with a None +argument).

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for Port<T>

§

impl<T> !Send for Port<T>

§

impl<T> !Sync for Port<T>

§

impl<T> Unpin for Port<T>

§

impl<T> !UnwindSafe for Port<T>

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/struct.ReactionCtx.html b/reactor_rt/struct.ReactionCtx.html index 4175e68a..051964e3 100644 --- a/reactor_rt/struct.ReactionCtx.html +++ b/reactor_rt/struct.ReactionCtx.html @@ -1,34 +1,35 @@ -ReactionCtx in reactor_rt - Rust

Struct reactor_rt::ReactionCtx

source ·
pub struct ReactionCtx<'a, 'x> { /* private fields */ }
Expand description

The context in which a reaction executes. Its API +ReactionCtx in reactor_rt - Rust

+

Struct reactor_rt::ReactionCtx

source ·
pub struct ReactionCtx<'a, 'x> { /* private fields */ }
Expand description

The context in which a reaction executes. Its API allows mutating the event queue of the scheduler. Only the interactions declared at assembly time are allowed.

-

Implementations§

source§

impl<'a, 'x> ReactionCtx<'a, 'x>

source

pub fn get_start_time(&self) -> Instant

Returns the start time of the execution of this program.

+

Implementations§

source§

impl<'a, 'x> ReactionCtx<'a, 'x>

source

pub fn get_start_time(&self) -> Instant

Returns the start time of the execution of this program.

This is a logical instant with microstep zero.

-
source

pub fn get_physical_time(&self) -> Instant

Returns the current physical time.

+
source

pub fn get_physical_time(&self) -> Instant

Returns the current physical time.

Repeated invocation of this method may produce different values, although Instant is monotonic. The physical time is necessarily greater than the logical time.

-
source

pub fn get_logical_time(&self) -> Instant

Returns the current logical time.

+
source

pub fn get_logical_time(&self) -> Instant

Returns the current logical time.

Logical time is frozen during the execution of a reaction. Repeated invocation of this method will always produce the same value.

-
source

pub fn get_tag(&self) -> EventTag

Returns the tag at which the reaction executes.

+
source

pub fn get_tag(&self) -> EventTag

Returns the tag at which the reaction executes.

Repeated invocation of this method will always produce the same value.

-
source

pub fn is_shutdown(&self) -> bool

Returns whether this tag is the shutdown tag of the +

source

pub fn is_shutdown(&self) -> bool

Returns whether this tag is the shutdown tag of the application. If so, it’s necessarily the very last invocation of the current reaction (on a given reactor instance).

Repeated invocation of this method will always produce the same value.

-
source

pub fn get_elapsed_logical_time(&self) -> Duration

Returns the amount of logical time elapsed since the +

source

pub fn get_elapsed_logical_time(&self) -> Duration

Returns the amount of logical time elapsed since the start of the program. This does not take microsteps into account.

-
source

pub fn get_elapsed_physical_time(&self) -> Duration

Returns the amount of physical time elapsed since the +

source

pub fn get_elapsed_physical_time(&self) -> Duration

Returns the amount of physical time elapsed since the start of the program.

-

Since this uses Self::get_physical_time, be aware that +

Since this uses Self::get_physical_time, be aware that this function’s result may change over time.

-
source

pub fn num_workers(&self) -> usize

Returns the number of active workers in the execution of +

source

pub fn num_workers(&self) -> usize

Returns the number of active workers in the execution of a reactor program.

Return values:

    @@ -38,25 +39,25 @@
  • And if the number of workers was left unspecified, the return value might vary.
-
source

pub fn get<T: Copy>(&self, container: &impl ReactionTrigger<T>) -> Option<T>

Returns the current value of a port or action at this -logical time. If the value is absent, Option::None is +

source

pub fn get<T: Copy>(&self, container: &impl ReactionTrigger<T>) -> Option<T>

Returns the current value of a port or action at this +logical time. If the value is absent, Option::None is returned. This is the case if the action or port is -not present (Self::is_present), or if no value was -scheduled (action values are optional, see Self::schedule_with_v).

-

The value is copied out. See also Self::use_ref if this +not present (Self::is_present), or if no value was +scheduled (action values are optional, see Self::schedule_with_v).

+

The value is copied out. See also Self::use_ref if this is to be avoided.

Examples
if let Some(value) = ctx.get(port) {
     // branch is taken if the port is set
 }
-
source

pub fn get_ref<'q, T>( +

source

pub fn get_ref<'q, T>( &self, container: &'q impl ReactionTriggerWithRefAccess<T> -) -> Option<&'q T>

Returns a reference to the current value of a port or action at this -logical time. If the value is absent, Option::None is +) -> Option<&'q T>

Returns a reference to the current value of a port or action at this +logical time. If the value is absent, Option::None is returned. This is the case if the action or port is -not present (Self::is_present), or if no value was -scheduled (action values are optional, see Self::schedule_with_v).

+not present (Self::is_present), or if no value was +scheduled (action values are optional, see Self::schedule_with_v).

This does not require the value to be Copy, however, the implementation of this method currently may require unsafe code. The method is therefore not offered when compiling with the no-unsafe feature.

@@ -64,10 +65,10 @@
Examples
if let Some(value) = ctx.get_ref(port) {
     // value is a ref to the internal value
 }
-
source

pub fn use_ref<T, O>( +

source

pub fn use_ref<T, O>( &self, container: &impl ReactionTrigger<T>, - action: impl FnOnce(Option<&T>) -> O + action: impl FnOnce(Option<&T>) -> O ) -> O

Executes the provided closure on the value of the port or action. The value is fetched by reference and not copied.

@@ -80,23 +81,23 @@
Examples
if let Some(str) = ctx.use_ref_opt(port, Clone::clone) { // only entered if the port value is present, so no need to check is_present }
-

See also the similar Self::use_ref_opt.

-
source

pub fn use_ref_opt<T, O>( +

See also the similar Self::use_ref_opt.

+

source

pub fn use_ref_opt<T, O>( &self, container: &impl ReactionTrigger<T>, - action: impl FnOnce(&T) -> O -) -> Option<O>

Executes the provided closure on the value of the port, + action: impl FnOnce(&T) -> O +) -> Option<O>

Executes the provided closure on the value of the port, only if it is present. The value is fetched by reference and not copied.

-

See also the similar Self::use_ref.

-
source

pub fn set<T>(&mut self, port: &mut Port<T>, value: T)where - T: Sync,

Sets the value of the given port.

+

See also the similar Self::use_ref.

+
source

pub fn set<T>(&mut self, port: &mut Port<T>, value: T)
where + T: Sync,

Sets the value of the given port.

The change is visible at the same logical time, i.e. the value propagates immediately. This may hence schedule more reactions that should execute at the same logical time.

-
source

pub fn set_opt<T>(&mut self, port: &mut Port<T>, value: Option<T>)where - T: Sync,

Sets the value of the given port, if the given value is Some. +

source

pub fn set_opt<T>(&mut self, port: &mut Port<T>, value: Option<T>)
where + T: Sync,

Sets the value of the given port, if the given value is Some. Otherwise the port is not set and no reactions are triggered.

The change is visible at the same logical time, i.e. the value propagates immediately. This may hence @@ -109,10 +110,10 @@

Examples
if let Some(value) = ctx.get(source) { ctx.set(sink, value); }
-
source

pub fn is_present<T>(&self, action: &impl ReactionTrigger<T>) -> bool

Returns true if the given action was triggered at the +

source

pub fn is_present<T>(&self, action: &impl ReactionTrigger<T>) -> bool

Returns true if the given action was triggered at the current logical time.

-

If so, then it may, but must not, present a value (Self::get).

-
source

pub fn schedule<T: Sync>( +

If so, then it may, but must not, present a value (Self::get).

+

source

pub fn schedule<T: Sync>( &mut self, action: &mut impl SchedulableAsAction<T>, offset: Offset @@ -121,16 +122,16 @@

Examples
plus an optional additional time delay (see Offset). This delay is added to the current logical (resp. physical) time for logical (resp. physical) actions.

-

This is like Self::schedule_with_v, where the value is None.

+

This is like Self::schedule_with_v, where the value is None.

Examples
ctx.schedule(action, Asap);         // will be executed one microstep from now (+ own delay)
 ctx.schedule(action, after!(2 ms)); // will be executed 2 milliseconds from now (+ own delay)
 ctx.schedule(action, After(delay!(2 ms)));             // equivalent to the previous
 ctx.schedule(action, After(Duration::from_millis(2))); // equivalent to the previous
-
source

pub fn schedule_with_v<T: Sync>( +

source

pub fn schedule_with_v<T: Sync>( &mut self, action: &mut impl SchedulableAsAction<T>, - value: Option<T>, + value: Option<T>, offset: Offset )

Schedule an action to trigger at some point in the future,

The action will carry the given value at the time it @@ -138,21 +139,21 @@

Examples
to this method. The value can be cleared by using None as a value. Note that even if the value is absent, the action will still be present at the time it is triggered -(see Self::is_present).

+(see Self::is_present).

The action will trigger after its own implicit time delay, plus an optional additional time delay (see Offset). This delay is added to the current logical (resp. physical) time for logical (resp. physical) actions.

Examples
// will be executed 2 milliseconds (+ own delay) from now with that value.
-ctx.schedule_with_v(action, Some("value"), after!(2 msec));
+ctx.schedule_with_v(action, Some("value"), after!(2 msec));
 // will be executed one microstep from now, with no value
 ctx.schedule_with_v(action, None, Asap);
-// that's equivalent to
+// that's equivalent to
 ctx.schedule(action, Asap);
-
source

pub fn spawn_physical_thread<F, R>(&mut self, f: F) -> JoinHandle<R>where - F: FnOnce(&mut AsyncCtx) -> R + Send + 'static, - R: Send + 'static,

Spawn a new thread that can use a AsyncCtx +

source

pub fn spawn_physical_thread<F, R>(&mut self, f: F) -> JoinHandle<R>
where + F: FnOnce(&mut AsyncCtx) -> R + Send + 'static, + R: Send + 'static,

Spawn a new thread that can use a AsyncCtx to push asynchronous events to the reaction queue. This is only useful with physical actions.

Since the thread is allowed to keep references into the @@ -161,7 +162,7 @@

Examples
thread to finish its task. For that reason, the thread’s closure should not execute an infinite loop, it should at least check that the scheduler has not been terminated by -polling AsyncCtx::was_terminated.

+polling AsyncCtx::was_terminated.

Example
fn some_reaction(ctx: &mut ReactionCtx, phys_action: &PhysicalActionRef<u32>) {
     let phys_action = phys_action.clone(); // clone to move it into other thread
@@ -173,7 +174,7 @@ 
Example
link.schedule_physical_with_v(&phys_action, Some(123), Asap).unwrap(); }); }
-
source

pub fn request_stop(&mut self, offset: Offset)

Request that the application shutdown, possibly with +

source

pub fn request_stop(&mut self, offset: Offset)

Request that the application shutdown, possibly with a particular offset. Just like for actions, even a zero offset will only trigger the special shutdown trigger at the earliest one microstep after the current tag.

@@ -185,14 +186,14 @@
Example
// If in the meantime, another `request_stop` call schedules // shutdown for an earlier tag, that one will be honored instead. ctx.request_stop(after!(1 msec));
-

Auto Trait Implementations§

§

impl<'a, 'x> RefUnwindSafe for ReactionCtx<'a, 'x>

§

impl<'a, 'x> Send for ReactionCtx<'a, 'x>

§

impl<'a, 'x> Sync for ReactionCtx<'a, 'x>

§

impl<'a, 'x> Unpin for ReactionCtx<'a, 'x>

§

impl<'a, 'x> UnwindSafe for ReactionCtx<'a, 'x>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+

Auto Trait Implementations§

§

impl<'a, 'x> RefUnwindSafe for ReactionCtx<'a, 'x>

§

impl<'a, 'x> Send for ReactionCtx<'a, 'x>

§

impl<'a, 'x> Sync for ReactionCtx<'a, 'x>

§

impl<'a, 'x> Unpin for ReactionCtx<'a, 'x>

§

impl<'a, 'x> UnwindSafe for ReactionCtx<'a, 'x>

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/struct.ReactorId.html b/reactor_rt/struct.ReactorId.html index 485b32f9..ae39cce7 100644 --- a/reactor_rt/struct.ReactorId.html +++ b/reactor_rt/struct.ReactorId.html @@ -1,37 +1,45 @@ -ReactorId in reactor_rt - Rust

Struct reactor_rt::ReactorId

source ·
#[repr(transparent)]
pub struct ReactorId(_);
Expand description

The unique identifier of a reactor instance during +ReactorId in reactor_rt - Rust

+

Struct reactor_rt::ReactorId

source ·
pub struct ReactorId(/* private fields */);
Expand description

The unique identifier of a reactor instance during execution.

-

Implementations§

source§

impl ReactorId

source

pub const fn new(u: u16) -> Self

source

pub const fn raw(self) -> u16

Trait Implementations§

source§

impl Clone for ReactorId

source§

fn clone(&self) -> ReactorId

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for ReactorId

source§

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

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

impl Display for ReactorId

source§

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

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

impl Hash for ReactorId

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Idx for ReactorId

source§

fn from_usize(idx: usize) -> Self

Construct an Index from a usize. This is equivalent to From. Read more
source§

fn index(self) -> usize

Get the underlying index. This is equivalent to Into
source§

impl Ord for ReactorId

source§

fn cmp(&self, other: &ReactorId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<ReactorId> for ReactorId

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<ReactorId> for ReactorId

source§

fn partial_cmp(&self, other: &ReactorId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl Copy for ReactorId

source§

impl Eq for ReactorId

source§

impl StructuralEq for ReactorId

source§

impl StructuralPartialEq for ReactorId

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<I, T> IdxSliceIndex<I, T> for Iwhere - I: Idx,

§

type Output = T

§

fn get( +

Implementations§

source§

impl ReactorId

source

pub const fn new(u: u16) -> Self

source

pub const fn raw(self) -> u16

Trait Implementations§

source§

impl Clone for ReactorId

source§

fn clone(&self) -> ReactorId

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for ReactorId

source§

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

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

impl Display for ReactorId

source§

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

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

impl Hash for ReactorId

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Idx for ReactorId

source§

fn from_usize(idx: usize) -> Self

Construct an Index from a usize. This is equivalent to From. Read more
source§

fn index(self) -> usize

Get the underlying index. This is equivalent to Into
source§

impl Ord for ReactorId

source§

fn cmp(&self, other: &ReactorId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for ReactorId

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for ReactorId

source§

fn partial_cmp(&self, other: &ReactorId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for ReactorId

source§

impl Eq for ReactorId

source§

impl StructuralEq for ReactorId

source§

impl StructuralPartialEq for ReactorId

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
§

impl<Q, K> Comparable<K> for Q
where + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where + Q: Eq + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<I, T> IdxSliceIndex<I, T> for I
where + I: Idx,

§

type Output = T

§

fn get( self, - slice: &IndexSlice<I, [T]> -) -> Option<&<I as IdxSliceIndex<I, T>>::Output>

§

fn get_mut( + slice: &IndexSlice<I, [T]> +) -> Option<&<I as IdxSliceIndex<I, T>>::Output>

§

fn get_mut( self, - slice: &mut IndexSlice<I, [T]> -) -> Option<&mut <I as IdxSliceIndex<I, T>>::Output>

§

fn index(self, slice: &IndexSlice<I, [T]>) -> &<I as IdxSliceIndex<I, T>>::Output

§

fn index_mut( + slice: &mut IndexSlice<I, [T]> +) -> Option<&mut <I as IdxSliceIndex<I, T>>::Output>

§

fn index( self, - slice: &mut IndexSlice<I, [T]> -) -> &mut <I as IdxSliceIndex<I, T>>::Output

source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+ slice: &IndexSlice<I, [T]> +) -> &<I as IdxSliceIndex<I, T>>::Output
§

fn index_mut( + self, + slice: &mut IndexSlice<I, [T]> +) -> &mut <I as IdxSliceIndex<I, T>>::Output

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> ToOwned for Twhere - T: Clone,

§

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> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<N> NodeTrait for Nwhere - N: Copy + Ord + Hash,

\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

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> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<N> NodeTrait for N
where + N: Copy + Ord + Hash,

\ No newline at end of file diff --git a/reactor_rt/struct.SchedulerOptions.html b/reactor_rt/struct.SchedulerOptions.html index 8b568572..fcbb65ce 100644 --- a/reactor_rt/struct.SchedulerOptions.html +++ b/reactor_rt/struct.SchedulerOptions.html @@ -1,32 +1,33 @@ -SchedulerOptions in reactor_rt - Rust
pub struct SchedulerOptions {
-    pub keep_alive: bool,
-    pub timeout: Option<Duration>,
-    pub threads: usize,
-    pub dump_graph: bool,
+SchedulerOptions in reactor_rt - Rust
+    
pub struct SchedulerOptions {
+    pub keep_alive: bool,
+    pub timeout: Option<Duration>,
+    pub threads: usize,
+    pub dump_graph: bool,
 }
Expand description

Construction parameters for the scheduler.

LFC uses target properties to set them. With the “cli” feature, generated programs also feature CLI options to override the defaults at runtime.

-

Fields§

§keep_alive: bool

If true, we won’t shut down the scheduler as soon as +

Fields§

§keep_alive: bool

If true, we won’t shut down the scheduler as soon as the event queue is empty, provided there are still live threads that can send messages to the scheduler asynchronously.

-
§timeout: Option<Duration>

Timeout of reactor execution. If provided, the reactor +

§timeout: Option<Duration>

Timeout of reactor execution. If provided, the reactor program will be shut down at the latest at T0 + timeout. Calls to request_stop may make the program terminate earlier.

-
§threads: usize

Max number of threads to use in the thread pool. +

§threads: usize

Max number of threads to use in the thread pool. If zero, uses one thread per core. Ignored unless building with feature parallel-runtime.

-
§dump_graph: bool

If true, dump the dependency graph to a file before +

§dump_graph: bool

If true, dump the dependency graph to a file before starting execution.

-

Trait Implementations§

source§

impl Default for SchedulerOptions

source§

fn default() -> SchedulerOptions

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Default for SchedulerOptions

source§

fn default() -> SchedulerOptions

Returns the “default value” for a type. Read more

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/struct.SyncScheduler.html b/reactor_rt/struct.SyncScheduler.html index 06dba64e..374700c3 100644 --- a/reactor_rt/struct.SyncScheduler.html +++ b/reactor_rt/struct.SyncScheduler.html @@ -1,19 +1,20 @@ -SyncScheduler in reactor_rt - Rust
pub struct SyncScheduler<'x> { /* private fields */ }
Expand description

The runtime scheduler.

+SyncScheduler in reactor_rt - Rust +
pub struct SyncScheduler<'x> { /* private fields */ }
Expand description

The runtime scheduler.

Lifetime parameters: ’x and ’t are carried around everywhere, ’x allows us to take references into the dataflow graph, and ’t to spawn new scoped threads for physical actions. ’a is more useless but is needed to compile.

-

Implementations§

source§

impl<'x> SyncScheduler<'x>

source

pub fn run_main<R: ReactorInitializer + 'static>( +

Implementations§

source§

impl<'x> SyncScheduler<'x>

source

pub fn run_main<R: ReactorInitializer + 'static>( options: SchedulerOptions, args: R::Params -)

Auto Trait Implementations§

§

impl<'x> !RefUnwindSafe for SyncScheduler<'x>

§

impl<'x> !Send for SyncScheduler<'x>

§

impl<'x> !Sync for SyncScheduler<'x>

§

impl<'x> Unpin for SyncScheduler<'x>

§

impl<'x> !UnwindSafe for SyncScheduler<'x>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+)

Auto Trait Implementations§

§

impl<'x> !RefUnwindSafe for SyncScheduler<'x>

§

impl<'x> !Send for SyncScheduler<'x>

§

impl<'x> !Sync for SyncScheduler<'x>

§

impl<'x> Unpin for SyncScheduler<'x>

§

impl<'x> !UnwindSafe for SyncScheduler<'x>

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/struct.Timer.html b/reactor_rt/struct.Timer.html index c9b24648..7743759a 100644 --- a/reactor_rt/struct.Timer.html +++ b/reactor_rt/struct.Timer.html @@ -1,37 +1,38 @@ -Timer in reactor_rt - Rust

Struct reactor_rt::Timer

source ·
pub struct Timer {
+Timer in reactor_rt - Rust
+    

Struct reactor_rt::Timer

source ·
pub struct Timer {
     pub offset: Duration,
     pub period: Duration,
-    /* private fields */
+    /* private fields */
 }
Expand description

A timer is conceptually a logical action that may re-schedule itself periodically.

For periodic timers, a reaction is synthesized which reschedules the timer.

-

Fields§

§offset: Duration

Minimal duration after the start of the program after +

Fields§

§offset: Duration

Minimal duration after the start of the program after which the timer starts to trigger.

-
§period: Duration

Period between events emitted by this timer. A period +

§period: Duration

Period between events emitted by this timer. A period of zero means that the timer will trigger exactly once after the specified offset.

-

Implementations§

source§

impl Timer

source

pub fn is_periodic(&self) -> bool

Whether the timer should repeat itself. A period of zero +

Implementations§

source§

impl Timer

source

pub fn is_periodic(&self) -> bool

Whether the timer should repeat itself. A period of zero means that the timer will trigger exactly once after the specified offset.

-

Trait Implementations§

source§

impl ReactionTrigger<()> for Timer

source§

fn is_present(&self, now: &EventTag, _start: &Instant) -> bool

Returns whether the trigger is present, given that -the current logical time is the parameter.
source§

fn get_value(&self, now: &EventTag, start: &Instant) -> Option<()>

Copies the value out, if it is present. Whether a value +

Trait Implementations§

source§

impl ReactionTrigger<()> for Timer

source§

fn is_present(&self, now: &EventTag, _start: &Instant) -> bool

Returns whether the trigger is present, given that +the current logical time is the parameter.
source§

fn get_value(&self, now: &EventTag, start: &Instant) -> Option<()>

Copies the value out, if it is present. Whether a value is present is not in general the same thing as whether this trigger -Self::is_present. See crate::ReactionCtx::get.
source§

fn use_value_ref<O>( +Self::is_present. See crate::ReactionCtx::get.

source§

fn use_value_ref<O>( &self, - now: &EventTag, + now: &EventTag, start: &Instant, - action: impl FnOnce(Option<&()>) -> O + action: impl FnOnce(Option<&()>) -> O ) -> O

Execute an action using the current value of this trigger. -The closure is called even if the value is absent (with a None -argument).

Auto Trait Implementations§

§

impl RefUnwindSafe for Timer

§

impl Send for Timer

§

impl Sync for Timer

§

impl Unpin for Timer

§

impl UnwindSafe for Timer

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

+The closure is called even if the value is absent (with a None +argument).

Auto Trait Implementations§

§

impl RefUnwindSafe for Timer

§

impl Send for Timer

§

impl Sync for Timer

§

impl Unpin for Timer

§

impl UnwindSafe for Timer

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> 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
\ No newline at end of file diff --git a/reactor_rt/timers/struct.Timer.html b/reactor_rt/timers/struct.Timer.html index 5d7744e7..82112bed 100644 --- a/reactor_rt/timers/struct.Timer.html +++ b/reactor_rt/timers/struct.Timer.html @@ -1,11 +1,11 @@ - + Redirection -

Redirecting to ../../reactor_rt/prelude/struct.Timer.html...

- +

Redirecting to ../../reactor_rt/struct.Timer.html...

+ \ No newline at end of file diff --git a/reactor_rt/trait.ReactionTrigger.html b/reactor_rt/trait.ReactionTrigger.html index 7f2eaf67..4a58d7f6 100644 --- a/reactor_rt/trait.ReactionTrigger.html +++ b/reactor_rt/trait.ReactionTrigger.html @@ -1,31 +1,32 @@ -ReactionTrigger in reactor_rt - Rust
pub trait ReactionTrigger<T> {
+ReactionTrigger in reactor_rt - Rust
+    
pub trait ReactionTrigger<T> {
     // Required methods
-    fn get_value(&self, now: &EventTag, start: &Instant) -> Option<T>
-       where T: Copy;
+    fn get_value(&self, now: &EventTag, start: &Instant) -> Option<T>
+       where T: Copy;
     fn use_value_ref<O>(
         &self,
-        now: &EventTag,
+        now: &EventTag,
         start: &Instant,
-        action: impl FnOnce(Option<&T>) -> O
+        action: impl FnOnce(Option<&T>) -> O
     ) -> O;
 
     // Provided method
-    fn is_present(&self, now: &EventTag, start: &Instant) -> bool { ... }
+    fn is_present(&self, now: &EventTag, start: &Instant) -> bool { ... }
 }
Expand description

Common trait for actions, ports, and timer objects handed to reaction functions. This is meant to be used through the -API of ReactionCtx instead of directly.

-

Required Methods§

source

fn get_value(&self, now: &EventTag, start: &Instant) -> Option<T>where - T: Copy,

Copies the value out, if it is present. Whether a value +API of ReactionCtx instead of directly.

+

Required Methods§

source

fn get_value(&self, now: &EventTag, start: &Instant) -> Option<T>
where + T: Copy,

Copies the value out, if it is present. Whether a value is present is not in general the same thing as whether this trigger -Self::is_present. See crate::ReactionCtx::get.

-
source

fn use_value_ref<O>( +Self::is_present. See crate::ReactionCtx::get.

+

source

fn use_value_ref<O>( &self, - now: &EventTag, + now: &EventTag, start: &Instant, - action: impl FnOnce(Option<&T>) -> O + action: impl FnOnce(Option<&T>) -> O ) -> O

Execute an action using the current value of this trigger. -The closure is called even if the value is absent (with a None +The closure is called even if the value is absent (with a None argument).

-

Provided Methods§

source

fn is_present(&self, now: &EventTag, start: &Instant) -> bool

Returns whether the trigger is present, given that +

Provided Methods§

source

fn is_present(&self, now: &EventTag, start: &Instant) -> bool

Returns whether the trigger is present, given that the current logical time is the parameter.

-

Implementors§

\ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/reactor_rt/trait.ReactorBehavior.html b/reactor_rt/trait.ReactorBehavior.html index 2f52bf0b..0bd0f040 100644 --- a/reactor_rt/trait.ReactorBehavior.html +++ b/reactor_rt/trait.ReactorBehavior.html @@ -1,22 +1,27 @@ -ReactorBehavior in reactor_rt - Rust
pub trait ReactorBehavior {
+ReactorBehavior in reactor_rt - Rust
+    
pub trait ReactorBehavior {
     // Required methods
     fn id(&self) -> ReactorId;
-    fn react(&mut self, ctx: &mut ReactionCtx<'_, '_>, local_rid: LocalReactionId);
+    fn react(
+        &mut self,
+        ctx: &mut ReactionCtx<'_, '_>,
+        local_rid: LocalReactionId
+    );
     fn cleanup_tag(&mut self, ctx: &CleanupCtx);
 }
Expand description

The trait used by the framework to interact with the reactor during runtime.

Importantly, it’s object-safe and has no type parameters or associated types. This allows us to wrap it into a Box<dyn ReactorBehavior>.

-

Required Methods§

source

fn id(&self) -> ReactorId

The unique ID of this reactor. This is given by the +

Required Methods§

source

fn id(&self) -> ReactorId

The unique ID of this reactor. This is given by the framework upon construction.

-
source

fn react(&mut self, ctx: &mut ReactionCtx<'_, '_>, local_rid: LocalReactionId)

Execute a single user-written reaction. +

source

fn react(&mut self, ctx: &mut ReactionCtx<'_, '_>, local_rid: LocalReactionId)

Execute a single user-written reaction. Dispatches on the reaction id, and unpacks parameters, which are the reactor components declared as fields of this struct.

It must always be the case that local_rid < Self::MAX_REACTION_ID, where Self::MAX_REACTION_ID is defined by the assembly::ReactorInitializer, because of object safety.

-
source

fn cleanup_tag(&mut self, ctx: &CleanupCtx)

Acknowledge that the given tag is done executing and +

source

fn cleanup_tag(&mut self, ctx: &CleanupCtx)

Acknowledge that the given tag is done executing and free resources if need be.

-

Implementors§

\ No newline at end of file +

Implementors§

\ No newline at end of file diff --git a/reactor_rt/trait.SchedulableAsAction.html b/reactor_rt/trait.SchedulableAsAction.html index 1471de62..2541a2cc 100644 --- a/reactor_rt/trait.SchedulableAsAction.html +++ b/reactor_rt/trait.SchedulableAsAction.html @@ -1,3 +1,4 @@ -SchedulableAsAction in reactor_rt - Rust
pub trait SchedulableAsAction<T: Sync> { }
Expand description

Implemented by LogicalAction and PhysicalAction references -to give access to ReactionCtx::schedule and variants.

-

Implementors§

\ No newline at end of file +SchedulableAsAction in reactor_rt - Rust +
pub trait SchedulableAsAction<T: Sync> { }
Expand description

Implemented by LogicalAction and PhysicalAction references +to give access to ReactionCtx::schedule and variants.

+

Implementors§

\ No newline at end of file diff --git a/search-index.js b/search-index.js index b90716be..62f1e60a 100644 --- a/search-index.js +++ b/search-index.js @@ -1,6 +1,5 @@ -var searchIndex = JSON.parse('{\ -"reactor_rt":{"doc":"The runtime library for reactor programs generated by LFC, …","t":"NNDNDDDNDDDSNSNSNDDNSEDDDDIIDNSIDDEDSSLLLLLOOLLLLLLAOOLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLLLLLLLLLLLLLLLLLOOLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLLLLLKLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLMMLLLLLMALLKLLLLLLLLLLLLLLLOOMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLLLLLLLLLKDDDGNNDDDDNSNQEISSDQKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDDDDDDSDDDDOOLLLLLLLLLLLLLLLLLLLLLLLOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLLMMLMLLLLLLLLLOLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGLLLLLLL","n":["After","Asap","AsyncCtx","DAY","Duration","EventTag","GlobalReactionId","HOUR","Instant","LocalReactionId","LogicalAction","MAX","MICRO","MICROSECOND","MILLI","MILLISECOND","MIN","MicroStep","Multiport","NANO","NANOSECOND","Offset","PhysicalAction","PhysicalActionRef","Port","ReactionCtx","ReactionTrigger","ReactorBehavior","ReactorId","SEC","SECOND","SchedulableAsAction","SchedulerOptions","SyncScheduler","TimeUnit","Timer","ZERO","ZERO","add","add","add","add_assign","add_assign","after","after","as_micros","as_millis","as_nanos","as_secs","as_secs_f32","as_secs_f64","assembly","assert_tag_is","assert_tag_is","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","checked_add","checked_add","checked_div","checked_duration_since","checked_mul","checked_sub","checked_sub","cleanup_tag","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","cmp","default","default","delay","delay","div","div_assign","div_duration_f32","div_duration_f64","div_f32","div_f64","dump_graph","duration_since","elapsed","eq","eq","eq","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from_micros","from_millis","from_nanos","from_secs","from_secs_f32","from_secs_f64","from_usize","from_usize","get","get","get_mut","get_mut","get_value","hash","hash","hash","hash","hash","hash","id","index","index","index","index","index_mut","index_mut","into","into","into","into","into","into","into","into","into","into","is_present","is_present","is_zero","keep_alive","microstep","mul","mul_assign","mul_f32","mul_f64","new","new","new","new","now","offset","offset_from_t0","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","period","prelude","raw","raw","react","run_main","saturating_add","saturating_duration_since","saturating_mul","saturating_sub","sub","sub","sub","sub_assign","sub_assign","subsec_micros","subsec_millis","subsec_nanos","sum","sum","tag","tag","threads","timeout","to_duration","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from_secs_f32","try_from_secs_f64","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_parse_duration","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","use_value_ref","AssemblyCtx","AssemblyError","AssemblyIntermediate","AssemblyResult","ChildInputReference","ChildOutputReference","ComponentCreator","DependencyDeclarator","FinishedReactor","GlobalReactionId","Input","MAX_REACTION_ID","Output","Params","PortKind","ReactorInitializer","SHUTDOWN","STARTUP","TriggerId","Wrapped","assemble","assemble","assemble_self","bind_ports","bind_ports_iterated","bind_ports_zip","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","cmp","cmp","declare_triggers","declare_uses","effects_multiport","effects_port","eq","eq","eq","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from_usize","get","get_mut","hash","hash","hash","index","index","index_mut","into","into","into","into","into","into","into","into","into","new","new_logical_action","new_multiport","new_physical_action","new_port","new_timer","partial_cmp","partial_cmp","to_owned","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","with_child","with_child_bank","AsyncCtx","Duration","EventTag","Instant","LogicalAction","Multiport","ORIGIN","PhysicalActionRef","Port","ReactionCtx","Timer","after","assert_tag_is","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","cmp","delay","duration_since_start","enumerate_set","enumerate_values","enumerate_values_ref","eq","equivalent","fmt","fmt","from","from","from","from","from","from","from","from","get","get_elapsed_logical_time","get_elapsed_physical_time","get_logical_time","get_physical_time","get_ref","get_start_time","get_tag","get_value","get_value","get_value","get_value","hash","index","index_mut","into","into","into","into","into","into","into","into","into_iter","into_iter","is_empty","is_periodic","is_present","is_present","is_present","is_present","is_present","is_shutdown","iter","iter_mut","iterate_set","iterate_values","iterate_values_ref","len","microstep","microstep","num_workers","offset","offset","offset_from_t0","partial_cmp","period","request_stop","request_stop","schedule","schedule_physical","schedule_physical_with_v","schedule_with_v","set","set_opt","spawn_physical_thread","tag","to_logical_time","to_owned","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","unit","use_ref","use_ref_opt","use_value_ref","use_value_ref","use_value_ref","use_value_ref","was_terminated"],"q":["reactor_rt","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","reactor_rt::assembly","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","reactor_rt::prelude","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["Specify that the trigger will fire at least after the …","Specify that the trigger will fire as soon as possible. …","A type that can affect the logical event queue to implement","","A Duration type to represent a span of time, typically …","The tag of an event.","Global identifier for a reaction.","","A measurement of a monotonically nondecreasing clock. …","ID of a reaction local to its containing reactor.","A logical action.","The maximum duration.","","The duration of one microsecond.","","The duration of one millisecond.","","Type of the microsteps of an EventTag.","A multiport is a vector of independent ports (its channels)","","The duration of one nanosecond.","An offset from the current event.","A physical action. Physical actions may only be used with …","A reference to a physical action. This thing is cloneable …","Represents a port, which carries values of type T. Ports …","The context in which a reaction executes. Its API allows …","Common trait for actions, ports, and timer objects handed …","The trait used by the framework to interact with the …","The unique identifier of a reactor instance during …","","The duration of one second.","Implemented by LogicalAction and PhysicalAction references …","Construction parameters for the scheduler.","The runtime scheduler.","A unit of time, used in LF.","A timer is conceptually a logical action that may …","","A duration of zero time.","","Panics","","","","Shorthand for using After together with delay.","Shorthand for using After together with delay.","Returns the total number of whole microseconds contained …","Returns the total number of whole milliseconds contained …","Returns the total number of nanoseconds contained by this …","Returns the number of whole seconds contained by this …","Returns the number of seconds contained by this Duration …","Returns the number of seconds contained by this Duration …","Module containing the API to initialize a reactor program.","Convenient macro to assert equality of the current tag. …","Convenient macro to assert equality of the current tag. …","","","","","","","","","","","","","","","","","","","","","Returns Some(t) where t is the time self + duration if t …","Checked Duration addition. Computes self + other, …","Checked Duration division. Computes self / other, …","Returns the amount of time elapsed from another instant to …","Checked Duration multiplication. Computes self * other, …","Returns Some(t) where t is the time self - duration if t …","Checked Duration subtraction. Computes self - other, …","Acknowledge that the given tag is done executing and free …","","","","","","","","","","","","","","","","","","","","Creates a Duration value using the same syntax as in LF.","Creates a Duration value using the same syntax as in LF.","","","Divide Duration by Duration and return f32.","Divide Duration by Duration and return f64.","Divide Duration by f32.","Divide Duration by f64.","If true, dump the dependency graph to a file before …","Returns the amount of time elapsed from another instant to …","Returns the amount of time elapsed since this instant.","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Creates a new Duration from the specified number of …","Creates a new Duration from the specified number of …","Creates a new Duration from the specified number of …","Creates a new Duration from the specified number of whole …","Creates a new Duration from the specified number of …","Creates a new Duration from the specified number of …","","","","","","","Copies the value out, if it is present. Whether a value is …","","","","","","","The unique ID of this reactor. This is given by the …","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns whether the trigger is present, given that the …","Returns whether the trigger is present, given that the …","Returns true if this Duration spans no time.","If true, we won’t shut down the scheduler as soon as the …","The microstep of this tag.","","","Multiplies Duration by f32.","Multiplies Duration by f64.","","","","Creates a new Duration from the specified number of whole …","Returns an instant corresponding to “now”.","Minimal duration after the start of the program after …","The time offset from the origin of the logical timeline. …","","","","","","Period between events emitted by this timer. A period of …","The prelude that is imported at the top of reactor files …","","","Execute a single user-written reaction. Dispatches on the …","","Saturating Duration addition. Computes self + other, …","Returns the amount of time elapsed from another instant to …","Saturating Duration multiplication. Computes self * other, …","Saturating Duration subtraction. Computes self - other, …","","Returns the amount of time elapsed from another instant to …","","","","Returns the fractional part of this Duration, in whole …","Returns the fractional part of this Duration, in whole …","Returns the fractional part of this Duration, in …","","","Convenient macro to create a tag. This is just a shorthand …","Convenient macro to create a tag. This is just a shorthand …","Max number of threads to use in the thread pool. If zero, …","Timeout of reactor execution. If provided, the reactor …","","","","","","","","","","","","","","","","","","","This recognizes the same strings as LF","","","The checked version of from_secs_f32.","The checked version of from_secs_f64.","","","","","","","","","","","Parse a duration from a string. This is used for CLI …","","","","","","","","","","","Execute an action using the current value of this trigger. …","Helper struct to assemble reactors during initialization. …","An error occurring during initialization of the reactor …","Intermediate result of assembly.","","","","Creates the components of a reactor.","Declares dependencies between components and reactions.","Final result of the assembly of a reactor.","Global identifier for a reaction.","","Exclusive maximum value of the local_rid parameter of […","","Type of the construction parameters.","Kind of a port.","Wrapper around the user struct for safe dispatch.","","","The ID of a trigger component.","Type of the user struct, which contains state variables of …","Assemble this reactor. This initializes state variables, …","top level function","Innermost function.","Bind two ports together.","","Bind the ports of the upstream to those of the downstream, …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Assembles a child reactor and makes it available in the …","Assembles a bank of children reactor and makes it …","A type that can affect the logical event queue to implement","A Duration type to represent a span of time, typically …","The tag of an event.","A measurement of a monotonically nondecreasing clock. …","A logical action.","A multiport is a vector of independent ports (its channels)","The tag of the startup event.","A reference to a physical action. This thing is cloneable …","Represents a port, which carries values of type T. Ports …","The context in which a reaction executes. Its API allows …","A timer is conceptually a logical action that may …","Shorthand for using After together with delay.","Convenient macro to assert equality of the current tag. …","","","","","","","","","","","","","","","","","","","","","","","","Creates a Duration value using the same syntax as in LF.","Returns the amount of time elapsed since the start of the …","Iterate over only those channels that are set (have a …","Iterate over only those channels that are set (have a …","Iterate over only those channels that are set (have a …","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the current value of a port or action at this …","Returns the amount of logical time elapsed since the start …","Returns the amount of physical time elapsed since the …","Returns the current logical time.","Returns the current physical time.","Returns a reference to the current value of a port or …","Returns the start time of the execution of this program.","Returns the tag at which the reaction executes.","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","Returns true if this multiport is empty.","Whether the timer should repeat itself. A period of zero …","","","Returns true if the given action was triggered at the …","","","Returns whether this tag is the shutdown tag of the …","Iterate over the channels of this multiport. Returns …","Iterate over the multiport and return mutable references …","Iterate over only those channels that are set (have a …","Iterate over only those channels that are set (have a …","Iterate over only those ports that are set (have a value), …","Returns the number of channels.","Returns the microstep of this tag.","The microstep of this tag.","Returns the number of active workers in the execution of a …","Create a new tag from its offset from t0 and a microstep. …","Minimal duration after the start of the program after …","The time offset from the origin of the logical timeline. …","","Period between events emitted by this timer. A period of …","Request that the application shutdown, possibly with a …","Request that the application shutdown, possibly with a …","Schedule an action to trigger at some point in the future. …","Schedule an action to run after its own implicit time delay","Schedule an action to run after its own implicit time delay","Schedule an action to trigger at some point in the future,","Sets the value of the given port.","Sets the value of the given port, if the given value is …","Spawn a new thread that can use a AsyncCtx to push …","Convenient macro to create a tag. This is just a shorthand …","Returns the logical instant for this tag, using the …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Alias for the unit type, so that it can be written without …","Executes the provided closure on the value of the port or …","Executes the provided closure on the value of the port, …","","","","","Returns true if the scheduler has been shutdown. When that…"],"i":[12,12,0,18,0,0,0,18,0,0,0,4,18,4,18,4,18,0,0,18,4,0,0,0,0,0,0,0,0,18,4,0,0,0,0,0,1,4,1,3,4,3,4,0,0,4,4,4,4,4,4,0,0,0,54,55,10,11,12,14,1,18,3,4,54,55,10,11,12,14,1,18,3,4,3,4,4,3,4,3,4,56,10,11,12,1,3,4,10,11,12,1,3,4,10,11,1,3,4,14,4,0,0,4,4,4,4,4,4,14,3,3,10,11,12,1,3,4,10,11,12,1,3,4,10,10,11,11,12,1,1,18,3,4,54,55,10,11,12,14,1,18,3,4,4,4,4,4,4,4,10,11,10,11,10,11,57,10,11,12,1,3,4,56,10,10,11,11,10,11,54,55,10,11,12,14,1,18,3,4,57,57,4,14,23,4,4,4,4,10,11,1,4,3,48,23,10,11,1,3,4,48,0,10,11,56,55,4,3,4,4,3,3,4,3,4,4,4,4,4,4,0,0,14,14,18,10,11,12,1,3,4,10,11,1,54,55,10,11,12,14,1,18,18,3,4,4,4,54,55,10,11,12,14,1,18,3,4,0,54,55,10,11,12,14,1,18,3,4,57,0,0,0,0,41,41,0,0,0,0,41,35,41,35,0,0,40,40,0,35,35,31,31,36,36,36,31,32,34,36,43,46,39,40,41,31,32,34,36,43,46,39,40,41,39,40,41,39,40,41,39,40,36,36,36,36,39,40,41,39,40,41,39,39,40,41,31,32,34,36,43,46,39,40,41,40,40,40,39,40,41,40,40,40,31,32,34,36,43,46,39,40,41,39,43,43,43,43,43,39,40,39,40,41,39,31,32,34,36,43,46,39,40,41,31,32,34,36,43,46,39,40,41,31,32,34,36,43,46,39,40,41,31,31,0,0,0,0,0,0,23,0,0,0,0,0,0,45,37,42,25,48,47,50,23,45,37,42,25,48,47,50,23,47,50,23,47,50,23,23,0,23,42,42,42,23,23,23,23,45,37,42,25,48,47,50,23,25,25,25,25,25,25,25,25,45,37,48,47,23,42,42,45,37,42,25,48,47,50,23,42,42,42,48,45,37,25,48,47,25,42,42,42,42,42,42,23,23,25,23,48,23,23,48,25,50,25,50,50,25,25,25,25,0,23,47,50,23,23,45,37,42,25,48,47,50,23,45,37,42,25,48,47,50,23,45,37,42,25,48,47,50,23,0,25,25,45,37,48,47,50],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[1,2]],[[3,4],3],[[4,4],4],[[3,4]],[[4,4]],0,0,[4,5],[4,5],[4,5],[4,6],[4,7],[4,8],0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[3,4],[[9,[3]]]],[[4,4],[[9,[4]]]],[[4,2],[[9,[4]]]],[[3,3],[[9,[4]]]],[[4,2],[[9,[4]]]],[[3,4],[[9,[3]]]],[[4,4],[[9,[4]]]],0,[10,10],[11,11],[12,12],[1,1],[3,3],[4,4],[[]],[[]],[[]],[[]],[[]],[[]],[[10,10],13],[[11,11],13],[[1,1],13],[[3,3],13],[[4,4],13],[[],14],[[],4],0,0,[[4,2],4],[[4,2]],[[4,4],7],[[4,4],8],[[4,7],4],[[4,8],4],0,[[3,3],4],[3,4],[[10,10],15],[[11,11],15],[[12,12],15],[[1,1],15],[[3,3],15],[[4,4],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[],15],[[10,16],17],[[10,16],17],[[11,16],17],[[11,16],17],[[12,16],17],[[1,16],17],[[1,16],17],[[18,16],17],[[3,16],[[20,[19]]]],[[4,16],[[20,[19]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[6,4],[6,4],[6,4],[6,4],[7,4],[8,4],[21,10],[21,11],[22,9],[22,9],[22,9],[22,9],[[23,3],9],[10],[11],[12],[1],[3],[4],[[],11],[22],[10,21],[22],[11,21],[22],[22],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[23,3],15],[[23,3],15],[4,15],0,0,[[4,2],4],[[4,2]],[[4,7],4],[[4,8],4],[24,10],[24,11],[2,1],[[6,2],4],[[],3],0,0,[[10,10],[[9,[13]]]],[[11,11],[[9,[13]]]],[[1,1],[[9,[13]]]],[[3,3],[[9,[13]]]],[[4,4],[[9,[13]]]],0,0,[10,24],[11,24],[[25,10]],[14],[[4,4],4],[[3,3],4],[[4,2],4],[[4,4],4],[[3,4],3],[[3,3],4],[[4,4],4],[[3,4]],[[4,4]],[4,2],[4,2],[4,2],[[],4],[[],4],0,0,0,0,[[18,6],4],[[]],[[]],[[]],[[]],[[]],[[]],[[],26],[[],26],[[],26],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[27,[[20,[18]]]],[[],20],[[],20],[7,[[20,[4,28]]]],[8,[[20,[4,28]]]],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[27,[[20,[4,26]]]],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[23,3,30]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[31,[[33,[32]]]],[[31,30],[[33,[32]]]],[[31,30,21,30],[[33,[34]]]],[[[36,[35]],37,37],33],[[[36,[35]],38,38],33],[[[36,[35]],38,38],33],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[39,39],[40,40],[41,41],[[]],[[]],[[]],[[39,39],13],[[40,40],13],[[[36,[35]],40,39],33],[[[36,[35]],39,40],33],[[[36,[35]],39,42],33],[[[36,[35]],39,37],33],[[39,39],15],[[40,40],15],[[41,41],15],[[],15],[[],15],[[],15],[[39,16],17],[[39,16],17],[[40,16],17],[[41,16],17],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[21,40],[22,9],[22,9],[39],[40],[41],[40,21],[22],[22],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[11,10],39],[[[43,[35]],27,[9,[4]]],[[45,[44]]]],[[[43,[35]],27,41,21],[[20,[[42,[44]],46]]]],[[[43,[35]],27,[9,[4]]],[[47,[44]]]],[[[43,[35]],27,41],[[37,[44]]]],[[[43,[35]],27,4,4],48],[[39,39],[[9,[13]]]],[[40,40],[[9,[13]]]],[[]],[[]],[[]],[[],26],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[31,27],[[33,[34]]]],[[31,27,21],[[33,[34]]]],0,0,0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[47,[[0,[49,44]]]]],[[47,[[0,[49,44]]]]]],[50,50],[23,23],[[]],[[]],[[]],[[23,23],13],0,[23,4],[[[42,[44]]],38],[[[42,[44]]],38],[[[42,[44]]],38],[[23,23],15],[[],15],[[23,16],17],[[23,16],17],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[25,[[9,[51]]]],[25,4],[25,4],[25,3],[25,3],[25,9],[25,3],[25,23],[[[45,[44]],23,3],[[9,[44]]]],[[[37,[44]],23,3],[[9,[44]]]],[[48,23,3],9],[[[47,[44]],23,3],[[9,[44]]]],[23],[[[42,[44]],21]],[[[42,[44]],21]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[42],[42],[[[42,[44]]],15],[48,15],[[[45,[44]],23,3],15],[[[37,[44]],23,3],15],[25,15],[[48,23,3],15],[[[47,[44]],23,3],15],[25,15],[[[42,[44]]],38],[[[42,[44]]],38],[[[42,[44]]],38],[[[42,[44]]],38],[[[42,[44]]],38],[[[42,[44]]],21],[23,1],0,[25,21],[[4,2],23],0,0,[[23,23],[[9,[13]]]],0,[[25,12]],[[50,12],[[20,[52]]]],[[25,12]],[[50,47,12],[[20,[[52,[[9,[44]]]]]]]],[[50,47,[9,[44]],12],[[20,[[52,[[9,[44]]]]]]]],[[25,[9,[44]],12]],[[25,37]],[[25,37,9]],[25,53],0,[[23,3],3],[[]],[[]],[[]],[[],26],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],20],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],0,[[25,30]],[[25,30],9],[[[45,[44]],23,3,30]],[[[37,[44]],23,3,30]],[[48,23,3,30]],[[[47,[44]],23,3,30]],[50,15]],"p":[[3,"MicroStep"],[15,"u32"],[3,"Instant"],[3,"Duration"],[15,"u128"],[15,"u64"],[15,"f32"],[15,"f64"],[4,"Option"],[3,"LocalReactionId"],[3,"ReactorId"],[4,"Offset"],[4,"Ordering"],[3,"SchedulerOptions"],[15,"bool"],[3,"Formatter"],[6,"Result"],[4,"TimeUnit"],[3,"Error"],[4,"Result"],[15,"usize"],[3,"IndexSlice"],[3,"EventTag"],[15,"u16"],[3,"ReactionCtx"],[3,"String"],[15,"str"],[3,"TryFromFloatSecsError"],[3,"TypeId"],[8,"FnOnce"],[3,"AssemblyCtx"],[3,"FinishedReactor"],[6,"AssemblyResult"],[3,"AssemblyIntermediate"],[8,"ReactorInitializer"],[3,"DependencyDeclarator"],[3,"Port"],[8,"Iterator"],[3,"GlobalReactionId"],[3,"TriggerId"],[4,"PortKind"],[3,"Multiport"],[3,"ComponentCreator"],[8,"Sync"],[3,"LogicalAction"],[3,"AssemblyError"],[3,"PhysicalActionRef"],[3,"Timer"],[8,"Clone"],[3,"AsyncCtx"],[8,"Copy"],[3,"SendError"],[3,"JoinHandle"],[3,"PhysicalAction"],[3,"SyncScheduler"],[8,"ReactorBehavior"],[8,"ReactionTrigger"]]},\ -"vecmap":{"doc":"This is a formally verified implementation of a sparse map …","t":"EDNDNDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLL","n":["Entry","KeyRef","Occupied","OccupiedEntry","Vacant","VacantEntry","VecMap","as_ref","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cloned","contains_key","default","entry","entry_from_ref","find_random_mapping_after","fmt","fmt","from","from","from","from","from","from","from","get","get_mut","insert","insert","into","into","into","into","into","iter","key","keyref","max_key","min_entry","new","next_mapping","remove","replace","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id"],"q":["vecmap","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["A view into a single entry in a map, which may either be …","A key zipped with its internal index in this map. For some …","An occupied Entry","An occupied Entry.","A vacant Entry","A vacant Entry.","A sparse map representation over a totally ordered key …","","","","","","","","","","","","","","","","","Checks if key is contained in the map.","","Find an entry with assumption that the key is random …","Find the entry matching key. Use key_hint to accelerate …","Finds entry reference, either directly associated with …","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","Get the value associated with key, if it exists.","Gets the mutable ref to the entry’s value.","Insert value for key in the map. If key is already …","Sets the value of the entry with the VacantEntry’s key.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Iterate over all key-value paris in the map.","","","Obtain the key of the item with the greatest key, unless …","Obtain keyref-value pair of the item with the smallest …","","Produces the first mapping that follows the given key in …","Removes the item with key and returns its value. If no …","Replaces the entry’s value with value.","","","","","","","","","","","","","","","","","",""],"i":[0,0,7,0,7,0,0,1,5,7,15,14,1,5,7,15,14,1,5,1,5,1,1,5,5,5,5,5,5,1,5,7,15,14,1,1,1,5,14,5,15,5,7,15,14,1,5,1,7,5,5,5,5,5,14,5,1,1,5,7,15,14,1,5,7,15,14,1,5,7,15,14,1],"f":[0,0,0,0,0,0,0,[1,1],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[5,[[0,[2,3,4]],2]]],[[5,[[0,[2,3,4]],2]]]],[[[1,[2]]],[[1,[2]]]],[[]],[[]],[1,[[1,[2]]]],[5,6],[[],[[5,[[0,[4,3]]]]]],[5,7],[[5,1],7],[5,8],[[[5,[[0,[4,3,9]],9]],10],11],[[[1,[12]],10],11],[[]],[[]],[[]],[[]],[[],1],[13],[[]],[5,8],[14],[5,8],[15],[[]],[[]],[[]],[[]],[[]],[5,16],0,[7,1],[5,8],[5,8],[[],5],[[5,1],8],[5,8],[14],[[]],[[]],[[],17],[[],18],[[],18],[[],18],[[],18],[[],18],[[],18],[[],18],[[],18],[[],18],[[],18],[[],19],[[],19],[[],19],[[],19],[[],19]],"p":[[3,"KeyRef"],[8,"Clone"],[8,"Eq"],[8,"Ord"],[3,"VecMap"],[15,"bool"],[4,"Entry"],[4,"Option"],[8,"Debug"],[3,"Formatter"],[6,"Result"],[8,"Display"],[15,"never"],[3,"OccupiedEntry"],[3,"VacantEntry"],[8,"Iterator"],[3,"String"],[4,"Result"],[3,"TypeId"]]}\ -}'); -if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; -if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; +var searchIndex = new Map(JSON.parse('[\ +["reactor_rt",{"doc":"The runtime library for reactor programs generated by LFC, …","t":"PPFPFFFPFFFTPTPTPFFPTTGFFFFKKFPTKFFGFTTNNNNNNQQNNNNNNCQQNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNQQNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNONNNNNNNNNNNOONNNNNNOCNNMNNNNNNNNNNNNNNNNNNNNNNNNQQOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNMNNNNNFFFIPPFFPFFPTPPRGKTTFERMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNEFEFEEEEEEQQQQI","n":["After","Asap","AsyncCtx","DAY","Duration","EventTag","GlobalReactionId","HOUR","Instant","LocalReactionId","LogicalAction","MAX","MICRO","MICROSECOND","MILLI","MILLISECOND","MIN","MicroStep","Multiport","NANO","NANOSECOND","ORIGIN","Offset","PhysicalAction","PhysicalActionRef","Port","ReactionCtx","ReactionTrigger","ReactorBehavior","ReactorId","SEC","SECOND","SchedulableAsAction","SchedulerOptions","SyncScheduler","TimeUnit","Timer","ZERO","ZERO","abs_diff","add","add","add","add_assign","add_assign","after","after","as_micros","as_millis","as_nanos","as_secs","as_secs_f32","as_secs_f64","assembly","assert_tag_is","assert_tag_is","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","checked_add","checked_add","checked_div","checked_duration_since","checked_mul","checked_sub","checked_sub","cleanup_tag","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","cmp","cmp","compare","compare","compare","compare","compare","compare","default","default","delay","delay","div","div_assign","div_duration_f32","div_duration_f64","div_f32","div_f64","dump_graph","duration_since","duration_since_start","elapsed","enumerate_set","enumerate_values","enumerate_values_ref","eq","eq","eq","eq","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_micros","from_millis","from_nanos","from_secs","from_secs_f32","from_secs_f64","from_usize","from_usize","get","get","get","get_elapsed_logical_time","get_elapsed_physical_time","get_logical_time","get_mut","get_mut","get_physical_time","get_ref","get_start_time","get_tag","get_value","get_value","get_value","get_value","get_value","hash","hash","hash","hash","hash","hash","hash","id","index","index","index","index","index","index_mut","index_mut","index_mut","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_iter","into_iter","is_empty","is_periodic","is_present","is_present","is_present","is_present","is_present","is_present","is_present","is_shutdown","is_zero","iter","iter_mut","iterate_set","iterate_values","iterate_values_ref","keep_alive","len","microstep","microstep","mul","mul_assign","mul_f32","mul_f64","new","new","new","new","now","num_workers","offset","offset","offset_from_t0","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","period","prelude","raw","raw","react","request_stop","request_stop","run_main","saturating_add","saturating_duration_since","saturating_mul","saturating_sub","schedule","schedule_physical","schedule_physical_with_v","schedule_with_v","set","set_opt","spawn_physical_thread","sub","sub","sub","sub_assign","sub_assign","subsec_micros","subsec_millis","subsec_nanos","sum","sum","tag","tag","threads","timeout","to_duration","to_logical_time","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from_secs_f32","try_from_secs_f64","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_parse_duration","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","use_ref","use_ref_opt","use_value_ref","use_value_ref","use_value_ref","use_value_ref","use_value_ref","was_terminated","AssemblyCtx","AssemblyError","AssemblyIntermediate","AssemblyResult","ChildInputReference","ChildOutputReference","ComponentCreator","DependencyDeclarator","Err","FinishedReactor","GlobalReactionId","Input","MAX_REACTION_ID","Ok","Output","Params","PortKind","ReactorInitializer","SHUTDOWN","STARTUP","TriggerId","TriggerLike","Wrapped","assemble","assemble","assemble_self","bind_ports","bind_ports_iterated","bind_ports_zip","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","cmp","cmp","compare","compare","declare_triggers","declare_uses","effects_multiport","effects_port","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from_usize","get","get_mut","hash","hash","hash","index","index","index_mut","into","into","into","into","into","into","into","into","into","new","new_logical_action","new_multiport","new_physical_action","new_port","new_timer","partial_cmp","partial_cmp","to_owned","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","with_child","with_child_bank","AsyncCtx","Duration","EventTag","Instant","LogicalAction","Multiport","PhysicalActionRef","Port","ReactionCtx","Timer","after","assert_tag_is","delay","tag","unit"],"q":[[0,"reactor_rt"],[419,"reactor_rt::assembly"],[564,"reactor_rt::prelude"],[579,"core::option"],[580,"core::clone"],[581,"core::marker"],[582,"core::cmp"],[583,"core::iter::traits::iterator"],[584,"core::marker"],[585,"core::fmt"],[586,"index_vec::idxslice"],[587,"core::hash"],[588,"crossbeam_channel::err"],[589,"std::thread"],[590,"core::marker"],[591,"alloc::string"],[592,"core::time"],[593,"core::any"],[594,"core::ops::function"]],"d":["Specify that the trigger will fire at least after the …","Specify that the trigger will fire as soon as possible. …","A type that can affect the logical event queue to implement","","A Duration type to represent a span of time, typically …","The tag of an event.","Global identifier for a reaction.","","A measurement of a monotonically nondecreasing clock. …","ID of a reaction local to its containing reactor.","A logical action.","The maximum duration.","","The duration of one microsecond.","","The duration of one millisecond.","","Type of the microsteps of an EventTag.","A multiport is a vector of independent ports (its channels)","","The duration of one nanosecond.","The tag of the startup event.","An offset from the current event.","A physical action. Physical actions may only be used with …","A reference to a physical action. This thing is cloneable …","Represents a port, which carries values of type T. Ports …","The context in which a reaction executes. Its API allows …","Common trait for actions, ports, and timer objects handed …","The trait used by the framework to interact with the …","The unique identifier of a reactor instance during …","","The duration of one second.","Implemented by LogicalAction and PhysicalAction references …","Construction parameters for the scheduler.","The runtime scheduler.","A unit of time, used in LF.","A timer is conceptually a logical action that may …","","A duration of zero time.","Computes the absolute difference between self and other.","","Panics","","","","Shorthand for using After together with [delay].","Shorthand for using After together with [delay].","Returns the total number of whole microseconds contained …","Returns the total number of whole milliseconds contained …","Returns the total number of nanoseconds contained by this …","Returns the number of whole seconds contained by this …","Returns the number of seconds contained by this Duration …","Returns the number of seconds contained by this Duration …","Module containing the API to initialize a reactor program.","Convenient macro to assert equality of the current tag. …","Convenient macro to assert equality of the current tag. …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns Some(t) where t is the time self + duration if t …","Checked Duration addition. Computes self + other, …","Checked Duration division. Computes self / other, …","Returns the amount of time elapsed from another instant to …","Checked Duration multiplication. Computes self * other, …","Returns Some(t) where t is the time self - duration if t …","Checked Duration subtraction. Computes self - other, …","Acknowledge that the given tag is done executing and free …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Creates a Duration value using the same syntax as in LF.","Creates a Duration value using the same syntax as in LF.","","","Divide Duration by Duration and return f32.","Divide Duration by Duration and return f64.","Divide Duration by f32.","Divide Duration by f64.","If true, dump the dependency graph to a file before …","Returns the amount of time elapsed from another instant to …","Returns the amount of time elapsed since the start of the …","Returns the amount of time elapsed since this instant.","Iterate over only those channels that are set (have a …","Iterate over only those channels that are set (have a …","Iterate over only those channels that are set (have a …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Creates a new Duration from the specified number of …","Creates a new Duration from the specified number of …","Creates a new Duration from the specified number of …","Creates a new Duration from the specified number of whole …","Creates a new Duration from the specified number of …","Creates a new Duration from the specified number of …","","","Returns the current value of a port or action at this …","","","Returns the amount of logical time elapsed since the start …","Returns the amount of physical time elapsed since the …","Returns the current logical time.","","","Returns the current physical time.","Returns a reference to the current value of a port or …","Returns the start time of the execution of this program.","Returns the tag at which the reaction executes.","Copies the value out, if it is present. Whether a value is …","","","","","","","","","","","","The unique ID of this reactor. This is given by the …","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","Returns true if this multiport is empty.","Whether the timer should repeat itself. A period of zero …","","","Returns true if the given action was triggered at the …","","Returns whether the trigger is present, given that the …","Returns whether the trigger is present, given that the …","","Returns whether this tag is the shutdown tag of the …","Returns true if this Duration spans no time.","Iterate over the channels of this multiport. Returns …","Iterate over the multiport and return mutable references …","Iterate over only those channels that are set (have a …","Iterate over only those channels that are set (have a …","Iterate over only those ports that are set (have a value), …","If true, we won’t shut down the scheduler as soon as the …","Returns the number of channels.","Returns the microstep of this tag.","The microstep of this tag.","","","Multiplies Duration by f32.","Multiplies Duration by f64.","","","","Creates a new Duration from the specified number of whole …","Returns an instant corresponding to “now”.","Returns the number of active workers in the execution of a …","Create a new tag from its offset from t0 and a microstep. …","Minimal duration after the start of the program after …","The time offset from the origin of the logical timeline. …","","","","","","","Period between events emitted by this timer. A period of …","The prelude that is imported at the top of reactor files …","","","Execute a single user-written reaction. Dispatches on the …","Request that the application shutdown, possibly with a …","Request that the application shutdown, possibly with a …","","Saturating Duration addition. Computes self + other, …","Returns the amount of time elapsed from another instant to …","Saturating Duration multiplication. Computes self * other, …","Saturating Duration subtraction. Computes self - other, …","Schedule an action to trigger at some point in the future. …","Schedule an action to run after its own implicit time delay","Schedule an action to run after its own implicit time delay","Schedule an action to trigger at some point in the future,","Sets the value of the given port.","Sets the value of the given port, if the given value is …","Spawn a new thread that can use a AsyncCtx to push …","","Returns the amount of time elapsed from another instant to …","","","","Returns the fractional part of this Duration, in whole …","Returns the fractional part of this Duration, in whole …","Returns the fractional part of this Duration, in …","","","Convenient macro to create a tag. This is just a shorthand …","Convenient macro to create a tag. This is just a shorthand …","Max number of threads to use in the thread pool. If zero, …","Timeout of reactor execution. If provided, the reactor …","","Returns the logical instant for this tag, using the …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","This recognizes the same strings as LF","","","","The checked version of from_secs_f32.","The checked version of from_secs_f64.","","","","","","","","","","","","","","","","","","","Parse a duration from a string. This is used for CLI …","","","","","","","","","","","","","","","","","","","Executes the provided closure on the value of the port or …","Executes the provided closure on the value of the port, …","Execute an action using the current value of this trigger. …","","","","","Returns true if the scheduler has been shutdown. When that…","Helper struct to assemble reactors during initialization. …","An error occurring during initialization of the reactor …","Intermediate result of assembly.","","","","Creates the components of a reactor.","Declares dependencies between components and reactions.","Contains the error value","Final result of the assembly of a reactor.","Global identifier for a reaction.","","Exclusive maximum value of the local_rid parameter of […","Contains the success value","","Type of the construction parameters.","Kind of a port.","Wrapper around the user struct for safe dispatch.","","","The ID of a trigger component.","","Type of the user struct, which contains state variables of …","Assemble this reactor. This initializes state variables, …","top level function","Innermost function.","Bind two ports together.","","Bind the ports of the upstream to those of the downstream, …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Assembles a child reactor and makes it available in the …","Assembles a bank of children reactor and makes it …","","A Duration type to represent a span of time, typically …","","A measurement of a monotonically nondecreasing clock. …","","","","","","","Shorthand for using After together with [delay].","Convenient macro to assert equality of the current tag. …","Creates a Duration value using the same syntax as in LF.","Convenient macro to create a tag. This is just a shorthand …","Alias for the unit type, so that it can be written without …"],"i":[18,18,0,31,0,0,0,31,0,0,0,1,31,1,31,1,31,0,0,31,1,19,0,0,0,0,0,0,0,0,31,1,0,0,0,0,0,2,1,1,2,4,1,4,1,0,0,1,1,1,1,1,1,0,0,0,38,68,25,22,34,69,39,12,15,16,17,18,19,21,2,31,4,1,38,68,25,22,34,69,39,12,15,16,17,18,19,21,2,31,4,1,4,1,1,4,1,4,1,11,12,15,16,17,18,19,2,4,1,12,15,16,17,18,19,2,4,1,15,16,19,2,4,1,15,16,19,2,4,1,21,1,0,0,1,1,1,1,1,1,21,4,19,4,22,22,22,15,16,18,19,2,4,1,15,15,15,16,16,16,18,18,18,19,19,19,2,2,2,4,4,4,1,1,1,15,15,16,16,18,19,19,2,2,31,4,1,38,68,25,22,34,69,39,12,15,16,17,18,19,21,2,31,4,1,1,1,1,1,1,1,15,16,34,15,16,34,34,34,15,16,34,34,34,34,35,38,25,39,12,15,16,18,19,2,4,1,11,22,15,15,16,16,22,15,16,38,68,25,22,34,69,39,12,15,16,17,18,19,21,2,31,4,1,22,22,22,39,38,25,34,39,35,35,12,34,1,22,22,22,22,22,21,22,19,19,1,1,1,1,15,16,2,1,4,34,19,39,19,15,16,19,2,4,1,39,0,15,16,11,34,17,69,1,4,1,1,34,17,17,34,34,34,34,4,4,1,4,1,1,1,1,1,1,0,0,21,21,31,19,12,15,16,17,18,19,2,4,1,15,16,19,2,38,68,25,22,34,69,39,12,15,16,17,18,19,21,2,31,31,4,1,1,1,38,68,25,22,34,69,39,12,15,16,17,18,19,21,2,31,4,1,0,38,68,25,22,34,69,39,12,15,16,17,18,19,21,2,31,4,1,34,34,35,38,25,39,12,17,0,0,0,0,65,65,0,0,57,0,0,65,54,57,65,54,0,0,64,64,0,0,54,54,55,55,62,62,62,55,56,58,62,60,61,63,64,65,55,56,58,62,60,61,63,64,65,63,64,65,63,64,65,63,64,63,64,62,62,62,62,63,64,65,63,63,63,64,64,64,65,65,65,63,63,64,65,55,56,58,62,60,61,63,64,65,64,64,64,63,64,65,64,64,64,55,56,58,62,60,61,63,64,65,63,60,60,60,60,60,63,64,63,64,65,63,55,56,58,62,60,61,63,64,65,55,56,58,62,60,61,63,64,65,55,56,58,62,60,61,63,64,65,55,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[1,1],1],[[2,3],-1,[]],[[4,1],4],[[1,1],1],[[4,1],5],[[1,1],5],0,0,[1,6],[1,6],[1,6],[1,7],[1,8],[1,9],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[4,1],[[10,[4]]]],[[1,1],[[10,[1]]]],[[1,3],[[10,[1]]]],[[4,4],[[10,[1]]]],[[1,3],[[10,[1]]]],[[4,1],[[10,[4]]]],[[1,1],[[10,[1]]]],0,[[[12,[-1]]],[[12,[-1]]],[13,14]],[15,15],[16,16],[17,17],[18,18],[19,19],[2,2],[4,4],[1,1],[[-1,-2],5,[],[]],[[-1,-2],5,[],[]],[[-1,-2],5,[],[]],[[-1,-2],5,[],[]],[[-1,-2],5,[],[]],[[-1,-2],5,[],[]],[[-1,-2],5,[],[]],[[-1,-2],5,[],[]],[[-1,-2],5,[],[]],[[15,15],20],[[16,16],20],[[19,19],20],[[2,2],20],[[4,4],20],[[1,1],20],[[-1,-2],20,[],[]],[[-1,-2],20,[],[]],[[-1,-2],20,[],[]],[[-1,-2],20,[],[]],[[-1,-2],20,[],[]],[[-1,-2],20,[],[]],[[],21],[[],1],0,0,[[1,3],1],[[1,3],5],[[1,1],8],[[1,1],9],[[1,8],1],[[1,9],1],0,[[4,4],1],[19,1],[4,1],[[[22,[-1]]],[[0,[[26,[],[[23,[[5,[24,[25,[-1]]]]]]]]]]],14],[[[22,[-1]]],[[0,[[26,[],[[23,[[5,[24,-1]]]]]]]]],[27,14]],[[[22,[-1]]],[[0,[[26,[],[[23,[[5,[24,-1]]]]]]]]],14],[[15,15],28],[[16,16],28],[[18,18],28],[[19,19],28],[[2,2],28],[[4,4],28],[[1,1],28],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[15,29],30],[[15,29],30],[[16,29],30],[[16,29],30],[[18,29],30],[[19,29],30],[[19,29],30],[[2,29],30],[[2,29],30],[[31,29],30],[[4,29],[[33,[5,32]]]],[[1,29],[[33,[5,32]]]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[7,1],[7,1],[7,1],[7,1],[8,1],[9,1],[24,15],[24,16],[[34,-2],[[10,[-1]]],27,[[35,[-1]]]],[[-1,[37,[-2,[36,[-3]]]]],10,[],[],[]],[[-1,[37,[-2,[36,[-3]]]]],10,[],[],[]],[34,1],[34,1],[34,4],[[-1,[37,[-2,[36,[-3]]]]],10,[],[],[]],[[-1,[37,[-2,[36,[-3]]]]],10,[],[],[]],[34,4],[[34,-2],[[10,[-1]]],[],[[0,[-1]]]],[34,4],[34,19],[[35,19,4],[[10,[-1]]],27],[[[38,[-1]],19,4],[[10,[-1]]],[27,14]],[[[25,[-1]],19,4],[[10,[-1]]],[27,14]],[[39,19,4],[[10,[5]]]],[[[12,[-1]],19,4],[[10,[-1]]],[27,14]],[[15,-1],5,40],[[16,-1],5,40],[[18,-1],5,40],[[19,-1],5,40],[[2,-1],5,40],[[4,-1],5,40],[[1,-1],5,40],[11,16],[[[22,[-1]],24],-2,14,[]],[[-1,[37,[-2,[36,[-3]]]]],[],[],[],[]],[15,24],[16,24],[[-1,[37,[-2,[36,[-3]]]]],[],[],[],[]],[[[22,[-1]],24],-2,14,[]],[[-1,[37,[-2,[36,[-3]]]]],[],[],[],[]],[[-1,[37,[-2,[36,[-3]]]]],[],[],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[22,[-1]]],-2,14,[]],[[[22,[-1]]],-2,14,[]],[[[22,[-1]]],28,14],[39,28],[[[38,[-1]],19,4],28,14],[[[25,[-1]],19,4],28,14],[[34,-2],28,[],[[35,[-1]]]],[[39,19,4],28],[[35,19,4],28],[[35,19,4],28],[[[12,[-1]],19,4],28,14],[34,28],[1,28],[[[22,[-1]]],[[0,[[26,[],[[23,[[25,[-1]]]]]]]]],14],[[[22,[-1]]],[[0,[[26,[],[[23,[[25,[-1]]]]]]]]],14],[[[22,[-1]]],[[0,[[26,[],[[23,[[25,[-1]]]]]]]]],14],[[[22,[-1]]],[[0,[[26,[],[[23,[-1]]]]]]],[27,14]],[[[22,[-1]]],[[0,[[26,[],[[23,[-1]]]]]]],14],0,[[[22,[-1]]],24,14],[19,2],0,[[1,3],1],[[1,3],5],[[1,8],1],[[1,9],1],[41,15],[41,16],[3,2],[[7,3],1],[[],4],[34,24],[[1,3],19],0,0,[[15,15],[[10,[20]]]],[[16,16],[[10,[20]]]],[[19,19],[[10,[20]]]],[[2,2],[[10,[20]]]],[[4,4],[[10,[20]]]],[[1,1],[[10,[20]]]],0,0,[15,41],[16,41],[[11,34,15],5],[[34,18],5],[[17,18],[[33,[5,[42,[5]]]]]],[21,5],[[1,1],1],[[4,4],1],[[1,3],1],[[1,1],1],[[34,-2,18],5,14,[[43,[-1]]]],[[17,[12,[-1]],18],[[33,[5,[42,[[10,[-1]]]]]]],14],[[17,[12,[-1]],[10,[-1]],18],[[33,[5,[42,[[10,[-1]]]]]]],14],[[34,-2,[10,[-1]],18],5,14,[[43,[-1]]]],[[34,[25,[-1]],-1],5,14],[[34,[25,[-1]],[10,[-1]]],5,14],[[34,-2],[[44,[-1]]],45,[[47,[17],[[46,[-1]]]],45]],[[4,1],4],[[4,4],1],[[1,1],1],[[4,1],5],[[1,1],5],[1,3],[1,3],[1,3],[-1,1,[[26,[],[[23,[1]]]]]],[-1,1,[[26,[],[[23,[1]]]]]],0,0,0,0,[[31,7],1],[[19,4],4],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,48,[]],[-1,48,[]],[-1,48,[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[49,[[33,[31,-1]]],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[8,[[33,[1,50]]]],[9,[[33,[1,50]]]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[49,[[33,[1,48]]]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[[34,-2,-4],-3,[],[[35,[-1]]],[],[[47,[[10,[-1]]],[[46,[-3]]]]]],[[34,-2,-4],[[10,[-3]]],[],[[35,[-1]]],[],[[47,[-1],[[46,[-3]]]]]],[[35,19,4,-3],-2,[],[],[[47,[[10,[-1]]],[[46,[-2]]]]]],[[[38,[-1]],19,4,-3],-2,14,[],[[47,[[10,[-1]]],[[46,[-2]]]]]],[[[25,[-1]],19,4,-3],-2,14,[],[[47,[[10,[-1]]],[[46,[-2]]]]]],[[39,19,4,-2],-1,[],[[47,[[10,[5]]],[[46,[-1]]]]]],[[[12,[-1]],19,4,-3],-2,14,[],[[47,[[10,[-1]]],[[46,[-2]]]]]],[17,28],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[-1,[55,[[54,[],[[52,[-2]],[53,[-1]]]]]]],[[57,[[56,[[54,[],[[52,[-2]],[53,[-1]]]]]]]]],[],[]],[[[55,[-1]],-2],[[57,[[56,[-1]]]]],54,[[47,[[55,[-1]]],[[46,[[57,[[58,[-1]]]]]]]]]],[[[55,[-1]],-2,24,[59,[[10,[49]]]],-3],[[57,[[58,[-1]]]]],54,[[47,[[60,[-1]],16],[[46,[[33,[-1,61]]]]]]],[[47,[[62,[-1]],-1,[59,[63]]],[[46,[[57,[5]]]]]]]],[[[62,[-1]],[25,[-2]],[25,[-2]]],[[57,[5]]],54,14],[[[62,[-1]],-3,-4],[[57,[5]]],54,14,[[26,[],[[23,[[25,[-2]]]]]]],[[26,[],[[23,[[25,[-2]]]]]]]],[[[62,[-1]],-3,-4],[[57,[5]]],54,14,[[26,[],[[23,[[25,[-2]]]]]]],[[26,[],[[23,[[25,[-2]]]]]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[63,63],[64,64],[65,65],[[-1,-2],5,[],[]],[[-1,-2],5,[],[]],[[-1,-2],5,[],[]],[[63,63],20],[[64,64],20],[[-1,-2],20,[],[]],[[-1,-2],20,[],[]],[[[62,[-1]],64,63],[[57,[5]]],54],[[[62,[-1]],63,64],[[57,[5]]],54],[[[62,[-1]],63,[22,[-2]]],[[57,[5]]],54,14],[[[62,[-1]],63,[25,[-2]]],[[57,[5]]],54,14],[[63,63],28],[[64,64],28],[[65,65],28],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[-1,-2],28,[],[]],[[63,29],30],[[63,29],30],[[64,29],30],[[65,29],30],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[24,64],[[-1,[37,[-2,[36,[-3]]]]],10,[],[],[]],[[-1,[37,[-2,[36,[-3]]]]],10,[],[],[]],[[63,-1],5,40],[[64,-1],5,40],[[65,-1],5,40],[[-1,[37,[-2,[36,[-3]]]]],[],[],[],[]],[64,24],[[-1,[37,[-2,[36,[-3]]]]],[],[],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[16,15],63],[[[60,[-1]],49,[10,[1]]],[[38,[-2]]],54,14],[[[60,[-1]],49,65,24],[[33,[[22,[-2]],61]]],54,14],[[[60,[-1]],49,[10,[1]]],[[12,[-2]]],54,14],[[[60,[-1]],49,65],[[25,[-2]]],54,14],[[[60,[-1]],49,1,1],39,54],[[63,63],[[10,[20]]]],[[64,64],[[10,[20]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,48,[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,[[33,[-2]]],[],[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[-1,51,[]],[[[55,[-1]],49,-3],[[57,[[58,[-1]]]]],54,54,[[47,[[55,[-1]],-2],[[46,[[57,[[58,[-1]]]]]]]]]],[[[55,[-1]],49,24,-2,-4],[[57,[[58,[-1]]]]],54,[[66,[24],[[46,[]]]]],54,[[47,[[55,[-1]],[67,[-3]]],[[46,[[57,[[58,[-1]]]]]]]]]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"c":[],"p":[[5,"Duration",0],[5,"MicroStep",0],[1,"u32"],[5,"Instant",0],[1,"tuple"],[1,"u128"],[1,"u64"],[1,"f32"],[1,"f64"],[6,"Option",579],[10,"ReactorBehavior",0],[5,"PhysicalActionRef",0],[10,"Clone",580],[10,"Sync",581],[5,"LocalReactionId",0],[5,"ReactorId",0],[5,"AsyncCtx",0],[6,"Offset",0],[5,"EventTag",0],[6,"Ordering",582],[5,"SchedulerOptions",0],[5,"Multiport",0],[17,"Item"],[1,"usize"],[5,"Port",0],[10,"Iterator",583],[10,"Copy",581],[1,"bool"],[5,"Formatter",584],[8,"Result",584],[6,"TimeUnit",0],[5,"Error",584],[6,"Result",585],[5,"ReactionCtx",0],[10,"ReactionTrigger",0],[1,"slice"],[5,"IndexSlice",586],[5,"LogicalAction",0],[5,"Timer",0],[10,"Hasher",587],[1,"u16"],[5,"SendError",588],[10,"SchedulableAsAction",0],[5,"JoinHandle",589],[10,"Send",581],[17,"Output"],[10,"FnOnce",590],[5,"String",591],[1,"str"],[5,"TryFromFloatSecsError",592],[5,"TypeId",593],[17,"Wrapped"],[17,"Params"],[10,"ReactorInitializer",419],[5,"AssemblyCtx",419],[5,"FinishedReactor",419],[8,"AssemblyResult",419],[5,"AssemblyIntermediate",419],[1,"array"],[5,"ComponentCreator",419],[5,"AssemblyError",419],[5,"DependencyDeclarator",419],[5,"GlobalReactionId",419],[5,"TriggerId",419],[6,"PortKind",419],[10,"Fn",590],[5,"Vec",594],[5,"PhysicalAction",0],[5,"SyncScheduler",0]],"b":[[175,"impl-Display-for-LocalReactionId"],[176,"impl-Debug-for-LocalReactionId"],[177,"impl-Debug-for-ReactorId"],[178,"impl-Display-for-ReactorId"],[180,"impl-Debug-for-EventTag"],[181,"impl-Display-for-EventTag"],[182,"impl-Debug-for-MicroStep"],[183,"impl-Display-for-MicroStep"],[264,"impl-IntoIterator-for-%26mut+Multiport%3CT%3E"],[265,"impl-IntoIterator-for-%26Multiport%3CT%3E"],[324,"impl-Sub%3CDuration%3E-for-Instant"],[325,"impl-Sub-for-Instant"],[332,"impl-Sum%3C%26Duration%3E-for-Duration"],[333,"impl-Sum-for-Duration"],[492,"impl-Debug-for-GlobalReactionId"],[493,"impl-Display-for-GlobalReactionId"]]}]\ +]')); +if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; +else if (window.initSearch) window.initSearch(searchIndex); diff --git a/settings.html b/settings.html index a6fef80a..b6911d1d 100644 --- a/settings.html +++ b/settings.html @@ -1 +1,2 @@ -Rustdoc settings

Rustdoc settings

Back
\ No newline at end of file +Settings +

Rustdoc settings

Back
\ No newline at end of file diff --git a/source-files.js b/source-files.js deleted file mode 100644 index 9541bc2d..00000000 --- a/source-files.js +++ /dev/null @@ -1,5 +0,0 @@ -var sourcesIndex = JSON.parse('{\ -"reactor_rt":["",[["scheduler",[],["assembly_impl.rs","context.rs","debug.rs","dependencies.rs","events.rs","mod.rs","scheduler_impl.rs"]],["util",[],["mod.rs"]]],["actions.rs","assembly.rs","ids.rs","lib.rs","ports.rs","time.rs","timers.rs","triggers.rs"]],\ -"vecmap":["",[],["lib.rs"]]\ -}'); -createSourceSidebar(); diff --git a/src-files.js b/src-files.js new file mode 100644 index 00000000..d32dbbb8 --- /dev/null +++ b/src-files.js @@ -0,0 +1,4 @@ +var srcIndex = new Map(JSON.parse('[\ +["reactor_rt",["",[["scheduler",[],["assembly_impl.rs","context.rs","debug.rs","dependencies.rs","events.rs","mod.rs","scheduler_impl.rs"]],["util",[],["mod.rs","vecmap.rs"]]],["actions.rs","assembly.rs","ids.rs","lib.rs","ports.rs","time.rs","timers.rs","triggers.rs"]]]\ +]')); +createSrcSidebar(); diff --git a/src/reactor_rt/actions.rs.html b/src/reactor_rt/actions.rs.html index 64c9008c..8e532a8b 100644 --- a/src/reactor_rt/actions.rs.html +++ b/src/reactor_rt/actions.rs.html @@ -1,4 +1,5 @@ -actions.rs - source
1
+actions.rs - source
+    
1
 2
 3
 4
@@ -277,7 +278,7 @@
 277
 278
 279
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -290,7 +291,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -338,7 +339,7 @@
 
 impl<K, T: Sync> Action<K, T> {
     /// Record a future value that can be queried at a future logical time.
-    /// Note that we don't check that the given time is in the future. If it's
+    /// Note that we don't check that the given time is in the future. If it's
     /// in the past, the value will never be reclaimed.
     ///
     ///
@@ -347,8 +348,8 @@
         match self.map.entry(Reverse(time)) {
             Entry::Vacant(e) => e.insert(value),
             Entry::Occupied(ref mut e) => {
-                trace!("Value overwritten in an action for tag {}", time);
-                trace!("This means an action was scheduled several times for the same tag.");
+                trace!("Value overwritten in an action for tag {}", time);
+                trace!("This means an action was scheduled several times for the same tag.");
                 e.replace(value)
             }
         }
@@ -392,7 +393,7 @@
     }
 }
 
-#[cfg(not(feature = "no-unsafe"))]
+#[cfg(not(feature = "no-unsafe"))]
 impl<T: Sync, K> triggers::ReactionTriggerWithRefAccess<T> for Action<K, T> {
     fn get_value_ref(&self, now: &EventTag, _start: &Instant) -> Option<&T> {
         self.map.get(&Reverse(*now)).map(|a| a.as_ref()).flatten()
@@ -419,7 +420,7 @@
     }
 }
 
-#[cfg(not(feature = "no-unsafe"))]
+#[cfg(not(feature = "no-unsafe"))]
 impl<T: Sync> triggers::ReactionTriggerWithRefAccess<T> for LogicalAction<T> {
     fn get_value_ref(&self, now: &EventTag, start: &Instant) -> Option<&T> {
         self.0.get_value_ref(now, start)
@@ -556,5 +557,4 @@
         self.use_value(|a| a.0.use_value_ref(now, start, action)).unwrap()
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/assembly.rs.html b/src/reactor_rt/assembly.rs.html index 50570a2c..ad83d030 100644 --- a/src/reactor_rt/assembly.rs.html +++ b/src/reactor_rt/assembly.rs.html @@ -1,4 +1,5 @@ -assembly.rs - source
1
+assembly.rs - source
+    
1
 2
 3
 4
@@ -80,7 +81,7 @@
 80
 81
 82
-
//! Module containing the API to initialize a reactor program.
+
//! Module containing the API to initialize a reactor program.
 
 use AssemblyErrorImpl::*;
 
@@ -139,17 +140,17 @@
     fn display(&self, debug: &DebugInfoRegistry) -> String {
         match self.0 {
             CyclicDependency(upstream, downstream) => format!(
-                "Port {} is already in the downstream of port {}",
+                "Port {} is already in the downstream of port {}",
                 debug.fmt_component(upstream),
                 debug.fmt_component(downstream)
             ),
-            CyclicDependencyGraph => "Cyclic dependency graph".to_string(),
+            CyclicDependencyGraph => "Cyclic dependency graph".to_string(),
             CannotBind(upstream, downstream) => format!(
-                "Cannot bind {} to {}, downstream is already bound",
+                "Cannot bind {} to {}, downstream is already bound",
                 debug.fmt_component(upstream),
                 debug.fmt_component(downstream)
             ),
-            IdOverflow => "Overflow when allocating component ID".to_string(),
+            IdOverflow => "Overflow when allocating component ID".to_string(),
         }
     }
 }
@@ -162,5 +163,4 @@
     ChildInputReference,
     ChildOutputReference,
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/ids.rs.html b/src/reactor_rt/ids.rs.html index 8e0ed096..cead08ee 100644 --- a/src/reactor_rt/ids.rs.html +++ b/src/reactor_rt/ids.rs.html @@ -1,4 +1,5 @@ -ids.rs - source
1
+ids.rs - source
+    
1
 2
 3
 4
@@ -238,7 +239,7 @@
 238
 239
 240
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -251,7 +252,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -316,8 +317,8 @@
 }
 
 impl Display for $id {
-    fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
-        write!(f, "{}", self.0)
+    fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
+        write!(f, "{}", self.0)
     }
 }
     };
@@ -347,14 +348,14 @@
         }
 
         impl Debug for $id {
-            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
-                write!(f, "{:?}", self.0)
+            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+                write!(f, "{:?}", self.0)
             }
         }
 
         impl Display for $id {
-            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
-                write!(f, "{}", self.0)
+            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+                write!(f, "{}", self.0)
             }
         }
     };
@@ -393,15 +394,15 @@
 }
 
 impl FromStr for GlobalId {
-    type Err = &'static str;
+    type Err = &'static str;
 
     fn from_str(s: &str) -> Result<Self, Self::Err> {
-        if let Some((container, local)) = s.split_once('/') {
-            let container = container.parse::<ReactorIdImpl>().map_err(|_| "invalid reactor id")?;
-            let local = local.parse::<ReactionIdImpl>().map_err(|_| "invalid local id")?;
+        if let Some((container, local)) = s.split_once('/') {
+            let container = container.parse::<ReactorIdImpl>().map_err(|_| "invalid reactor id")?;
+            let local = local.parse::<ReactionIdImpl>().map_err(|_| "invalid local id")?;
             Ok(GlobalId::new(ReactorId::new(container), LocalReactionId::new(local)))
         } else {
-            Err("Expected format {int}/{int}")
+            Err("Expected format {int}/{int}")
         }
     }
 }
@@ -446,22 +447,22 @@
 
 impl Debug for GlobalId {
     #[inline]
-    fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
+    fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
         <Self as Display>::fmt(self, f)
     }
 }
 
 impl Display for GlobalId {
     #[inline]
-    fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
-        write!(f, "{}/{}", self.container(), self.local())
+    fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
+        write!(f, "{}/{}", self.container(), self.local())
     }
 }
 
 /// private implementation types
 pub(crate) mod impl_types {
     cfg_if! {
-        if #[cfg(all(target_pointer_width = "64", feature = "wide-ids"))] {
+        if #[cfg(all(target_pointer_width = "64", feature = "wide-ids"))] {
             type MyUsize = usize;
             type HalfUsize = u32;
         } else {
@@ -478,5 +479,4 @@
     assert_impl_all!(GlobalIdImpl: petgraph::graph::IndexType);
     assert_impl_all!(ReactorIdImpl: petgraph::graph::IndexType);
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/lib.rs.html b/src/reactor_rt/lib.rs.html index 0dd782e1..23fff50e 100644 --- a/src/reactor_rt/lib.rs.html +++ b/src/reactor_rt/lib.rs.html @@ -1,4 +1,5 @@ -lib.rs - source
1
+lib.rs - source
+    
1
 2
 3
 4
@@ -159,7 +160,7 @@
 159
 160
 161
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -172,7 +173,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -229,7 +230,7 @@
 extern crate index_vec;
 #[macro_use]
 extern crate log;
-#[cfg(feature = "parallel-runtime")]
+#[cfg(feature = "parallel-runtime")]
 extern crate rayon;
 #[macro_use]
 extern crate smallvec;
@@ -284,7 +285,7 @@
 /// The trait used by the framework to interact with the reactor
 /// during runtime.
 ///
-/// Importantly, it's object-safe and has no type parameters
+/// Importantly, it's object-safe and has no type parameters
 /// or associated types. This allows us to wrap it into a
 /// `Box<dyn ReactorBehavior>`.
 pub trait ReactorBehavior {
@@ -309,7 +310,7 @@
 assert_obj_safe!(ReactorBehavior);
 
 /// Used for benchmarking to access private API of the crate.
-#[cfg(feature = "public-internals")]
+#[cfg(feature = "public-internals")]
 #[doc(hidden)]
 pub mod internals {
     pub use crate::ids::impl_types::*;
@@ -320,5 +321,4 @@
         GlobalReactionId(GlobalId::from_raw(u))
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/ports.rs.html b/src/reactor_rt/ports.rs.html index a9796a8b..8e36b5e5 100644 --- a/src/reactor_rt/ports.rs.html +++ b/src/reactor_rt/ports.rs.html @@ -1,4 +1,5 @@ -ports.rs - source
1
+ports.rs - source
+    
1
 2
 3
 4
@@ -469,7 +470,7 @@
 469
 470
 471
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -482,7 +483,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -494,11 +495,11 @@
  */
 
 use std::borrow::Borrow;
-#[cfg(not(feature = "no-unsafe"))]
+#[cfg(not(feature = "no-unsafe"))]
 use std::cell::UnsafeCell;
 use std::collections::HashMap;
 use std::fmt::Debug;
-#[cfg(feature = "no-unsafe")]
+#[cfg(feature = "no-unsafe")]
 use std::ops::Deref;
 use std::ops::{DerefMut, Index, IndexMut};
 use std::rc::Rc;
@@ -558,9 +559,9 @@
             id,
             kind,
             bind_status: BindStatus::Free,
-            #[cfg(feature = "no-unsafe")]
+            #[cfg(feature = "no-unsafe")]
             upstream_binding: Rc::new(AtomicRefCell::new(Default::default())),
-            #[cfg(not(feature = "no-unsafe"))]
+            #[cfg(not(feature = "no-unsafe"))]
             upstream_binding: Rc::new(UnsafeCell::new(Default::default())),
         }
     }
@@ -581,7 +582,7 @@
     }
 
     cfg_if! {
-        if #[cfg(feature = "no-unsafe")] {
+        if #[cfg(feature = "no-unsafe")] {
             pub(crate) fn use_ref<R>(&self, f: impl FnOnce(&Option<T>) -> R) -> R {
                 use atomic_refcell::AtomicRef;
                 let cell_ref: AtomicRef<Rc<PortCell<T>>> = AtomicRefCell::borrow(&self.upstream_binding);
@@ -598,7 +599,7 @@
             pub(crate) fn set_impl(&mut self, new_value: Option<T>) {
                 use atomic_refcell::AtomicRef;
 
-                debug_assert_ne!(self.bind_status, BindStatus::Bound, "Cannot set a bound port ({:?})", self.id);
+                debug_assert_ne!(self.bind_status, BindStatus::Bound, "Cannot set a bound port ({:?})", self.id);
 
                 let cell_ref: AtomicRef<Rc<PortCell<T>>> = AtomicRefCell::borrow(&self.upstream_binding);
                 let class_cell: &PortCell<T> = Rc::borrow(cell_ref.deref());
@@ -633,7 +634,7 @@
 
              #[inline]
              pub(crate) fn set_impl(&mut self, new_value: Option<T>) {
-                debug_assert_ne!(self.bind_status, BindStatus::Bound, "Cannot set a bound port");
+                debug_assert_ne!(self.bind_status, BindStatus::Bound, "Cannot set a bound port");
 
                 let binding: &UnsafeCell<Rc<PortCell<T>>> = Rc::borrow(&self.upstream_binding);
 
@@ -659,7 +660,7 @@
     pub(crate) fn forward_to(&mut self, downstream: &mut Port<T>) -> Result<(), AssemblyError> {
         let mut mut_downstream_cell = {
             cfg_if! {
-                if #[cfg(feature = "no-unsafe")] {
+                if #[cfg(feature = "no-unsafe")] {
                     (downstream.upstream_binding).borrow_mut()
                 } else {
                     unsafe { downstream.upstream_binding.get().as_mut().unwrap() }
@@ -675,7 +676,7 @@
 
         let my_class = {
             cfg_if! {
-                if #[cfg(feature = "no-unsafe")] {
+                if #[cfg(feature = "no-unsafe")] {
                     self.upstream_binding.borrow_mut()
                 } else {
                     unsafe { self.upstream_binding.get().as_mut().unwrap() }
@@ -718,7 +719,7 @@
     }
 }
 
-#[cfg(not(feature = "no-unsafe"))]
+#[cfg(not(feature = "no-unsafe"))]
 impl<T: Sync> crate::triggers::ReactionTriggerWithRefAccess<T> for Port<T> {
     fn get_value_ref(&self, _now: &EventTag, _start: &Instant) -> Option<&T> {
         self.get_ref()
@@ -746,7 +747,7 @@
 }
 
 cfg_if! {
-    if #[cfg(feature = "no-unsafe")] {
+    if #[cfg(feature = "no-unsafe")] {
         type Downstreams<T> = AtomicRefCell<HashMap<PortId, Rc<AtomicRefCell<Rc<PortCell<T>>>>>>;
         type UncheckedCell<T> = AtomicRefCell<T>;
     } else {
@@ -760,7 +761,7 @@
     /// Cell for the value.
     value: UncheckedCell<Option<T>>,
 
-    /// This is the set of ports that are "forwarded to".
+    /// This is the set of ports that are "forwarded to".
     /// When you bind 2 ports A -> B, then the binding of B
     /// is updated to point to the equiv class of A. The downstream
     /// field of that equiv class is updated to contain B.
@@ -792,7 +793,7 @@
     fn set_upstream(&self, new_binding: &Rc<PortCell<T>>) {
         for cell_rc in (*self.downstreams.borrow()).values() {
             cfg_if! {
-                if #[cfg(feature = "no-unsafe")] {
+                if #[cfg(feature = "no-unsafe")] {
                     let mut ref_mut = cell_rc.borrow_mut();
                     *ref_mut.deref_mut() = Rc::clone(new_binding);
                 } else {
@@ -870,7 +871,7 @@
     /// and return a copy of the value.
     /// The returned ports are not necessarily contiguous. See
     /// [Self::enumerate_values] to get access to their index.
-    pub fn iterate_values(&self) -> impl Iterator<Item = T> + '_
+    pub fn iterate_values(&self) -> impl Iterator<Item = T> + '_
     where
         T: Copy,
     {
@@ -881,14 +882,14 @@
     /// and return a reference to the value.
     /// The returned ports are not necessarily contiguous. See
     /// [Self::enumerate_values] to get access to their index.
-    #[cfg(not(feature = "no-unsafe"))]
-    pub fn iterate_values_ref(&self) -> impl Iterator<Item = &T> + '_ {
+    #[cfg(not(feature = "no-unsafe"))]
+    pub fn iterate_values_ref(&self) -> impl Iterator<Item = &T> + '_ {
         self.iter().filter_map(|p| p.get_ref())
     }
 
     /// Iterate over only those channels that are set (have a value),
     /// yielding a tuple with their index in the bank and a copy of the value.
-    pub fn enumerate_values(&self) -> impl Iterator<Item = (usize, T)> + '_
+    pub fn enumerate_values(&self) -> impl Iterator<Item = (usize, T)> + '_
     where
         T: Copy,
     {
@@ -897,8 +898,8 @@
 
     /// Iterate over only those channels that are set (have a value),
     /// yielding a tuple with their index in the bank and a reference to the value.
-    #[cfg(not(feature = "no-unsafe"))]
-    pub fn enumerate_values_ref(&self) -> impl Iterator<Item = (usize, &T)> + '_ {
+    #[cfg(not(feature = "no-unsafe"))]
+    pub fn enumerate_values_ref(&self) -> impl Iterator<Item = (usize, &T)> + '_ {
         self.iter().enumerate().filter_map(|(i, p)| p.get_ref().map(|v| (i, v)))
     }
 }
@@ -909,18 +910,18 @@
     }
 }
 
-impl<'a, T: Sync> IntoIterator for &'a mut Multiport<T> {
-    type Item = &'a mut Port<T>;
-    type IntoIter = std::slice::IterMut<'a, Port<T>>;
+impl<'a, T: Sync> IntoIterator for &'a mut Multiport<T> {
+    type Item = &'a mut Port<T>;
+    type IntoIter = std::slice::IterMut<'a, Port<T>>;
 
     fn into_iter(self) -> Self::IntoIter {
         self.ports.iter_mut()
     }
 }
 
-impl<'a, T: Sync> IntoIterator for &'a Multiport<T> {
-    type Item = &'a Port<T>;
-    type IntoIter = std::slice::Iter<'a, Port<T>>;
+impl<'a, T: Sync> IntoIterator for &'a Multiport<T> {
+    type Item = &'a Port<T>;
+    type IntoIter = std::slice::Iter<'a, Port<T>>;
 
     fn into_iter(self) -> Self::IntoIter {
         self.ports.iter()
@@ -940,5 +941,4 @@
         &mut self.ports[index]
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/scheduler/assembly_impl.rs.html b/src/reactor_rt/scheduler/assembly_impl.rs.html index eb9098b4..cb3ef085 100644 --- a/src/reactor_rt/scheduler/assembly_impl.rs.html +++ b/src/reactor_rt/scheduler/assembly_impl.rs.html @@ -1,4 +1,5 @@ -assembly_impl.rs - source
1
+assembly_impl.rs - source
+    
1
 2
 3
 4
@@ -548,7 +549,7 @@
 548
 549
 550
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -561,7 +562,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -585,7 +586,7 @@
 /// Globals shared by all assemblers.
 pub(super) struct RootAssembler {
     /// All registered reactors
-    pub(super) reactors: IndexVec<ReactorId, Option<ReactorBox<'static>>>,
+    pub(super) reactors: IndexVec<ReactorId, Option<ReactorBox<'static>>>,
     /// Dependency graph
     pub(super) graph: DepGraph,
     /// Debug infos
@@ -599,26 +600,26 @@
 
 impl RootAssembler {
     /// Register a reactor into the global data structure that owns them during execution.
-    fn register_reactor<R: ReactorInitializer + 'static>(&mut self, child: R) {
+    fn register_reactor<R: ReactorInitializer + 'static>(&mut self, child: R) {
         if child.id().index() >= self.reactors.len() {
             self.reactors.resize_with(child.id().index() + 1, || None)
         }
         let prev = self.reactors[child.id()].replace(Box::new(child));
         // this is impossible because we control how we allocate IDs entirely
-        debug_assert!(prev.is_none(), "Overwrote a reactor during initialization")
+        debug_assert!(prev.is_none(), "Overwrote a reactor during initialization")
     }
 
     /// Register reactors into the global data structure that owns them during execution.
-    fn register_bank<R: ReactorInitializer + 'static>(&mut self, bank: Vec<R>) {
+    fn register_bank<R: ReactorInitializer + 'static>(&mut self, bank: Vec<R>) {
         for child in bank {
             self.register_reactor(child)
         }
     }
 
     /// Top level fun that assembles the main reactor
-    pub fn assemble_tree<R: ReactorInitializer + 'static>(
+    pub fn assemble_tree<R: ReactorInitializer + 'static>(
         main_args: R::Params,
-    ) -> (ReactorVec<'static>, DepGraph, DebugInfoRegistry) {
+    ) -> (ReactorVec<'static>, DepGraph, DebugInfoRegistry) {
         let mut root = RootAssembler::default();
         let assembler = AssemblyCtx::new(&mut root, ReactorDebugInfo::root::<R::Wrapped>());
 
@@ -631,7 +632,7 @@
 
         let RootAssembler { graph, reactors, debug_info: id_registry, .. } = root;
 
-        let reactors = reactors.into_iter().map(|r| r.expect("Uninitialized reactor!")).collect();
+        let reactors = reactors.into_iter().map(|r| r.expect("Uninitialized reactor!")).collect();
         (reactors, graph, id_registry)
     }
 }
@@ -649,12 +650,12 @@
 }
 
 /// Helper struct to assemble reactors during initialization.
-/// One assembly context is used per reactor, they can't be shared.
-pub struct AssemblyCtx<'x, S>
+/// One assembly context is used per reactor, they can't be shared.
+pub struct AssemblyCtx<'x, S>
 where
     S: ReactorInitializer,
 {
-    globals: &'x mut RootAssembler,
+    globals: &'x mut RootAssembler,
     /// Next local ID for components != reactions
     cur_local: LocalReactionId,
 
@@ -669,20 +670,20 @@
 }
 
 /// Final result of the assembly of a reactor.
-pub struct FinishedReactor<'x, S>(AssemblyCtx<'x, S>, S)
+pub struct FinishedReactor<'x, S>(AssemblyCtx<'x, S>, S)
 where
     S: ReactorInitializer;
 
 /// Intermediate result of assembly.
-pub struct AssemblyIntermediate<'x, S>(AssemblyCtx<'x, S>, S)
+pub struct AssemblyIntermediate<'x, S>(AssemblyCtx<'x, S>, S)
 where
     S: ReactorInitializer;
 
-impl<'x, S> AssemblyCtx<'x, S>
+impl<'x, S> AssemblyCtx<'x, S>
 where
     S: ReactorInitializer,
 {
-    fn new(globals: &'x mut RootAssembler, debug: ReactorDebugInfo) -> Self {
+    fn new(globals: &'x mut RootAssembler, debug: ReactorDebugInfo) -> Self {
         Self {
             globals,
             // this is not zero, so that reaction ids and component ids are disjoint
@@ -696,8 +697,8 @@
     /// top level function
     pub fn assemble(
         self,
-        build_reactor_tree: impl FnOnce(Self) -> AssemblyResult<AssemblyIntermediate<'x, S>>,
-    ) -> AssemblyResult<FinishedReactor<'x, S>> {
+        build_reactor_tree: impl FnOnce(Self) -> AssemblyResult<AssemblyIntermediate<'x, S>>,
+    ) -> AssemblyResult<FinishedReactor<'x, S>> {
         let AssemblyIntermediate(ich, reactor) = build_reactor_tree(self)?;
         Ok(FinishedReactor(ich, reactor))
     }
@@ -707,12 +708,12 @@
         mut self,
         create_self: impl FnOnce(&mut ComponentCreator<S>, ReactorId) -> Result<S, AssemblyError>,
         num_non_synthetic_reactions: usize,
-        reaction_names: [Option<&'static str>; N],
+        reaction_names: [Option<&'static str>; N],
         declare_dependencies: impl FnOnce(&mut DependencyDeclarator<S>, &mut S, [GlobalReactionId; N]) -> AssemblyResult<()>,
-    ) -> AssemblyResult<AssemblyIntermediate<'x, S>> {
+    ) -> AssemblyResult<AssemblyIntermediate<'x, S>> {
         // todo when feature(generic_const_exprs) is stabilized,
         //  replace const parameter N with S::MAX_REACTION_ID.index().
-        debug_assert_eq!(N, S::MAX_REACTION_ID.index(), "Should initialize all reactions");
+        debug_assert_eq!(N, S::MAX_REACTION_ID.index(), "Should initialize all reactions");
 
         // note: the ID is not known until all descendants
         // have been built.
@@ -723,8 +724,8 @@
         // Effectively, IDs are assigned depth first. This
         // makes this whole debug info recording very complicated.
         let id = self.globals.reactor_id.get_and_incr();
-        let debug = self.debug.take().expect("unreachable - can only call assemble_self once");
-        trace!("Children of {}: {:?}", debug.to_string(), self.children_ids);
+        let debug = self.debug.take().expect("unreachable - can only call assemble_self once");
+        trace!("Children of {}: {:?}", debug.to_string(), self.children_ids);
         self.globals.debug_info.record_reactor(id, debug);
         for child in self.children_ids.drain(..) {
             self.globals.debug_info.record_reactor_container(id, child);
@@ -754,7 +755,7 @@
         &mut self,
         my_id: ReactorId,
         num_non_synthetic: usize,
-        names: [Option<&'static str>; N],
+        names: [Option<&'static str>; N],
     ) -> [GlobalReactionId; N] {
         assert!(num_non_synthetic <= N);
 
@@ -783,20 +784,20 @@
     /// Assembles a child reactor and makes it available in
     /// the scope of a function.
     #[inline]
-    pub fn with_child<Sub: ReactorInitializer + 'static, F>(
+    pub fn with_child<Sub: ReactorInitializer + 'static, F>(
         mut self,
-        inst_name: &'static str,
+        inst_name: &'static str,
         args: Sub::Params,
         action: F,
-    ) -> AssemblyResult<AssemblyIntermediate<'x, S>>
-    // we can't use impl FnOnce(...) because we want to specify explicit type parameters in the caller
+    ) -> AssemblyResult<AssemblyIntermediate<'x, S>>
+    // we can't use impl FnOnce(...) because we want to specify explicit type parameters in the caller
     where
-        F: FnOnce(Self, &mut Sub) -> AssemblyResult<AssemblyIntermediate<'x, S>>,
+        F: FnOnce(Self, &mut Sub) -> AssemblyResult<AssemblyIntermediate<'x, S>>,
     {
-        trace!("Assembling {}", inst_name);
+        trace!("Assembling {}", inst_name);
         let mut sub = self.assemble_sub(inst_name, None, args)?;
         let AssemblyIntermediate(ich, s) = action(self, &mut sub)?;
-        trace!("Registering {}", inst_name);
+        trace!("Registering {}", inst_name);
         ich.globals.register_reactor(sub);
         Ok(AssemblyIntermediate(ich, s))
     }
@@ -806,18 +807,18 @@
     #[inline]
     pub fn with_child_bank<Sub, A, F>(
         mut self,
-        inst_name: &'static str,
+        inst_name: &'static str,
         bank_width: usize,
         arg_maker: A,
         action: F,
-    ) -> AssemblyResult<AssemblyIntermediate<'x, S>>
+    ) -> AssemblyResult<AssemblyIntermediate<'x, S>>
     where
-        Sub: ReactorInitializer + 'static,
-        // we can't use impl Fn(...) because we want to specify explicit type parameters in the calle
-        F: FnOnce(Self, &mut Vec<Sub>) -> AssemblyResult<AssemblyIntermediate<'x, S>>,
+        Sub: ReactorInitializer + 'static,
+        // we can't use impl Fn(...) because we want to specify explicit type parameters in the calle
+        F: FnOnce(Self, &mut Vec<Sub>) -> AssemblyResult<AssemblyIntermediate<'x, S>>,
         A: Fn(/*bank_index:*/ usize) -> Sub::Params,
     {
-        trace!("Assembling bank {}", inst_name);
+        trace!("Assembling bank {}", inst_name);
 
         let mut sub = (0..bank_width)
             .map(|i| self.assemble_sub(inst_name, Some(i), arg_maker(i)))
@@ -825,7 +826,7 @@
 
         let AssemblyIntermediate(ich, r) = action(self, &mut sub)?;
 
-        trace!("Registering bank {}", inst_name);
+        trace!("Registering bank {}", inst_name);
         ich.globals.register_bank(sub);
         Ok(AssemblyIntermediate(ich, r))
     }
@@ -835,11 +836,11 @@
     #[inline(always)]
     fn assemble_sub<Sub: ReactorInitializer>(
         &mut self,
-        inst_name: &'static str,
+        inst_name: &'static str,
         bank_idx: Option<usize>,
         args: Sub::Params,
     ) -> AssemblyResult<Sub> {
-        let my_debug = self.debug.as_ref().expect("should assemble sub-reactors before self");
+        let my_debug = self.debug.as_ref().expect("should assemble sub-reactors before self");
 
         let debug_info = match bank_idx {
             None => my_debug.derive::<Sub>(inst_name),
@@ -853,7 +854,7 @@
     }
 }
 
-impl<S> FinishedReactor<'_, S>
+impl<S> FinishedReactor<'_, S>
 where
     S: ReactorInitializer,
 {
@@ -864,11 +865,11 @@
 }
 
 /// Declares dependencies between components and reactions.
-pub struct DependencyDeclarator<'a, 'x, S: ReactorInitializer> {
-    assembler: &'a mut AssemblyCtx<'x, S>,
+pub struct DependencyDeclarator<'a, 'x, S: ReactorInitializer> {
+    assembler: &'a mut AssemblyCtx<'x, S>,
 }
 
-impl<S: ReactorInitializer> DependencyDeclarator<'_, '_, S> {
+impl<S: ReactorInitializer> DependencyDeclarator<'_, '_, S> {
     #[inline]
     pub fn declare_triggers(&mut self, trigger: TriggerId, reaction: GlobalReactionId) -> AssemblyResult<()> {
         self.graph().triggers_reaction(trigger, reaction);
@@ -915,10 +916,10 @@
     /// todo this will just throw away bindings if both iterators are not of the same size
     ///  normally this should be reported by LFC as a warning, maybe we should implement the same thing here
     #[inline]
-    pub fn bind_ports_zip<'a, T: Sync + 'a>(
+    pub fn bind_ports_zip<'a, T: Sync + 'a>(
         &mut self,
-        upstream: impl Iterator<Item = &'a mut Port<T>>,
-        downstream: impl Iterator<Item = &'a mut Port<T>>,
+        upstream: impl Iterator<Item = &'a mut Port<T>>,
+        downstream: impl Iterator<Item = &'a mut Port<T>>,
     ) -> AssemblyResult<()> {
         for (upstream, downstream) in upstream.zip(downstream) {
             self.bind_ports(upstream, downstream)?;
@@ -927,16 +928,16 @@
     }
 
     #[inline]
-    pub fn bind_ports_iterated<'a, T: Sync + 'a>(
+    pub fn bind_ports_iterated<'a, T: Sync + 'a>(
         &mut self,
-        upstream: impl Iterator<Item = &'a mut Port<T>>,
-        mut downstream: impl Iterator<Item = &'a mut Port<T>>,
+        upstream: impl Iterator<Item = &'a mut Port<T>>,
+        mut downstream: impl Iterator<Item = &'a mut Port<T>>,
     ) -> AssemblyResult<()> {
         let mut upstream = upstream.collect::<Vec<_>>();
-        assert!(!upstream.is_empty(), "Empty upstream!");
+        assert!(!upstream.is_empty(), "Empty upstream!");
         let up_len = upstream.len();
         // we have to implement this loop manually instead of with an iterator
-        // because we can't clone mutable references in the upstream iterator
+        // because we can't clone mutable references in the upstream iterator
         for i in 0.. {
             let up = &mut upstream[i % up_len];
             if let Some(down) = downstream.next() {
@@ -955,16 +956,16 @@
 }
 
 /// Creates the components of a reactor.
-pub struct ComponentCreator<'a, 'x, S: ReactorInitializer> {
-    assembler: &'a mut AssemblyCtx<'x, S>,
+pub struct ComponentCreator<'a, 'x, S: ReactorInitializer> {
+    assembler: &'a mut AssemblyCtx<'x, S>,
 }
 
-impl<S: ReactorInitializer> ComponentCreator<'_, '_, S> {
-    pub fn new_port<T: Sync>(&mut self, lf_name: &'static str, kind: PortKind) -> Port<T> {
+impl<S: ReactorInitializer> ComponentCreator<'_, '_, S> {
+    pub fn new_port<T: Sync>(&mut self, lf_name: &'static str, kind: PortKind) -> Port<T> {
         self.new_port_impl(Cow::Borrowed(lf_name), kind)
     }
 
-    fn new_port_impl<T: Sync>(&mut self, lf_name: Cow<'static, str>, kind: PortKind) -> Port<T> {
+    fn new_port_impl<T: Sync>(&mut self, lf_name: Cow<'static, str>, kind: PortKind) -> Port<T> {
         let id = self.next_comp_id(lf_name);
         self.graph().record_port(id);
         Port::new(id, kind)
@@ -972,7 +973,7 @@
 
     pub fn new_multiport<T: Sync>(
         &mut self,
-        lf_name: &'static str,
+        lf_name: &'static str,
         kind: PortKind,
         len: usize,
     ) -> Result<Multiport<T>, AssemblyError> {
@@ -988,42 +989,42 @@
 
     fn new_port_bank_component<T: Sync>(
         &mut self,
-        lf_name: &'static str,
+        lf_name: &'static str,
         kind: PortKind,
         bank_id: TriggerId,
         index: usize,
     ) -> Port<T> {
-        let channel_id = self.next_comp_id(Cow::Owned(format!("{}[{}]", lf_name, index)));
+        let channel_id = self.next_comp_id(Cow::Owned(format!("{}[{}]", lf_name, index)));
         self.graph().record_port_bank_component(bank_id, channel_id);
         Port::new(channel_id, kind)
     }
 
-    pub fn new_logical_action<T: Sync>(&mut self, lf_name: &'static str, min_delay: Option<Duration>) -> LogicalAction<T> {
+    pub fn new_logical_action<T: Sync>(&mut self, lf_name: &'static str, min_delay: Option<Duration>) -> LogicalAction<T> {
         let id = self.next_comp_id(Cow::Borrowed(lf_name));
         self.graph().record_laction(id);
         LogicalAction::new(id, min_delay)
     }
 
-    pub fn new_physical_action<T: Sync>(&mut self, lf_name: &'static str, min_delay: Option<Duration>) -> PhysicalActionRef<T> {
+    pub fn new_physical_action<T: Sync>(&mut self, lf_name: &'static str, min_delay: Option<Duration>) -> PhysicalActionRef<T> {
         let id = self.next_comp_id(Cow::Borrowed(lf_name));
         self.graph().record_paction(id);
         PhysicalActionRef::new(id, min_delay)
     }
 
-    pub fn new_timer(&mut self, lf_name: &'static str, offset: Duration, period: Duration) -> Timer {
+    pub fn new_timer(&mut self, lf_name: &'static str, offset: Duration, period: Duration) -> Timer {
         let id = self.next_comp_id(Cow::Borrowed(lf_name));
         self.graph().record_timer(id);
         Timer::new(id, offset, period)
     }
 
     /// Create and return a new id for a trigger component.
-    fn next_comp_id(&mut self, debug_name: Cow<'static, str>) -> TriggerId {
+    fn next_comp_id(&mut self, debug_name: Cow<'static, str>) -> TriggerId {
         let id = self
             .assembler
             .globals
             .cur_trigger
             .get_and_incr()
-            .expect("Overflow while allocating ID");
+            .expect("Overflow while allocating ID");
         self.assembler.globals.debug_info.record_trigger(id, debug_name);
         id
     }
@@ -1098,5 +1099,4 @@
         iter.map(move |(i, j)| unsafe { &mut (*__ptr.add(i)).$field_name[j] })
     }};
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/scheduler/context.rs.html b/src/reactor_rt/scheduler/context.rs.html index 53f0ca32..44859048 100644 --- a/src/reactor_rt/scheduler/context.rs.html +++ b/src/reactor_rt/scheduler/context.rs.html @@ -1,4 +1,5 @@ -context.rs - source
1
+context.rs - source
+    
1
 2
 3
 4
@@ -804,7 +805,7 @@
 804
 805
 806
-
use std::borrow::Borrow;
+
use std::borrow::Borrow;
 use std::hash::{Hash, Hasher};
 use std::sync::atomic::{AtomicBool, Ordering};
 use std::sync::Arc;
@@ -827,8 +828,8 @@
 // ReactionCtx is an API built around a ReactionWave. A single
 // ReactionCtx may be used for multiple ReactionWaves, but
 // obviously at disjoint times (&mut).
-pub struct ReactionCtx<'a, 'x> {
-    pub(super) insides: RContextForwardableStuff<'x>,
+pub struct ReactionCtx<'a, 'x> {
+    pub(super) insides: RContextForwardableStuff<'x>,
 
     /// Logical time of the execution of this wave, constant
     /// during the existence of the object
@@ -841,23 +842,23 @@
     current_reaction: Option<GlobalReactionId>,
 
     /// Sender to schedule events that should be executed later than this wave.
-    rx: &'a Receiver<PhysicalEvent>,
+    rx: &'a Receiver<PhysicalEvent>,
 
     /// Start time of the program.
     initial_time: Instant,
 
     // globals, also they might be copied and passed to AsyncCtx
-    dataflow: &'x DataflowInfo,
-    debug_info: DebugInfoProvider<'a>,
+    dataflow: &'x DataflowInfo,
+    debug_info: DebugInfoProvider<'a>,
     /// Whether the scheduler has been shut down.
-    was_terminated_atomic: &'a Arc<AtomicBool>,
+    was_terminated_atomic: &'a Arc<AtomicBool>,
     /// In ReactionCtx, this will only be true if this is the shutdown tag.
     /// It duplicates [Self::was_terminated_atomic], to avoid an atomic
     /// operation within [Self::is_shutdown].
     was_terminated: bool,
 }
 
-impl<'a, 'x> ReactionCtx<'a, 'x> {
+impl<'a, 'x> ReactionCtx<'a, 'x> {
     /// Returns the start time of the execution of this program.
     ///
     /// This is a logical instant with microstep zero.
@@ -896,7 +897,7 @@
     }
 
     /// Returns whether this tag is the shutdown tag of the
-    /// application. If so, it's necessarily the very last
+    /// application. If so, it's necessarily the very last
     /// invocation of the current reaction (on a given reactor
     /// instance).
     ///
@@ -919,7 +920,7 @@
     /// start of the program.
     ///
     /// Since this uses [Self::get_physical_time], be aware that
-    /// this function's result may change over time.
+    /// this function's result may change over time.
     #[inline]
     pub fn get_elapsed_physical_time(&self) -> Duration {
         self.get_physical_time() - self.get_start_time()
@@ -936,7 +937,7 @@
     ///   the return value might vary.
     pub fn num_workers(&self) -> usize {
         cfg_if::cfg_if! {
-            if #[cfg(feature = "parallel-runtime")] {
+            if #[cfg(feature = "parallel-runtime")] {
                 rayon::current_num_threads()
             } else {
                 1
@@ -989,8 +990,8 @@
     /// }
     /// ```
     #[inline]
-    #[cfg(not(feature = "no-unsafe"))]
-    pub fn get_ref<'q, T>(&self, container: &'q impl crate::triggers::ReactionTriggerWithRefAccess<T>) -> Option<&'q T> {
+    #[cfg(not(feature = "no-unsafe"))]
+    pub fn get_ref<'q, T>(&self, container: &'q impl crate::triggers::ReactionTriggerWithRefAccess<T>) -> Option<&'q T> {
         container.get_value_ref(&self.get_tag(), &self.get_start_time())
     }
 
@@ -1063,7 +1064,7 @@
                 assert_eq!(
                     Some(reaction_container),
                     port_grandpa,
-                    "Input port {} can only be set by reactions of its grandparent, got reaction {}",
+                    "Input port {} can only be set by reactions of its grandparent, got reaction {}",
                     self.debug_info.id_registry.fmt_component(port_id),
                     self.debug_info.display_reaction(self.current_reaction.unwrap()),
                 );
@@ -1072,7 +1073,7 @@
                 assert_eq!(
                     reaction_container,
                     port_container,
-                    "Input port {} can only be set by reactions of its parent, got reaction {}",
+                    "Input port {} can only be set by reactions of its parent, got reaction {}",
                     self.debug_info.id_registry.fmt_component(port_id),
                     self.debug_info.display_reaction(self.current_reaction.unwrap()),
                 );
@@ -1166,12 +1167,12 @@
     /// ```no_run
     /// # use reactor_rt::prelude::*;
     /// # let ctx: &mut ReactionCtx = panic!();
-    /// # let action: &mut LogicalAction<&'static str> = panic!();
+    /// # let action: &mut LogicalAction<&'static str> = panic!();
     /// // will be executed 2 milliseconds (+ own delay) from now with that value.
-    /// ctx.schedule_with_v(action, Some("value"), after!(2 msec));
+    /// ctx.schedule_with_v(action, Some("value"), after!(2 msec));
     /// // will be executed one microstep from now, with no value
     /// ctx.schedule_with_v(action, None, Asap);
-    /// // that's equivalent to
+    /// // that's equivalent to
     /// ctx.schedule(action, Asap);
     /// ```
     #[inline]
@@ -1183,7 +1184,7 @@
     ///
     /// This is used for actions.
     #[inline]
-    pub(crate) fn enqueue_later(&mut self, downstream: &'x ExecutableReactions, tag: EventTag) {
+    pub(crate) fn enqueue_later(&mut self, downstream: &'x ExecutableReactions, tag: EventTag) {
         debug_assert!(tag > self.get_tag());
 
         let evt = Event::execute(tag, Cow::Borrowed(downstream));
@@ -1191,14 +1192,14 @@
     }
 
     #[inline]
-    pub(crate) fn enqueue_now(&mut self, downstream: Cow<'x, ExecutableReactions<'x>>) {
+    pub(crate) fn enqueue_now(&mut self, downstream: Cow<'x, ExecutableReactions<'x>>) {
         match &mut self.insides.todo_now {
             Some(ref mut do_next) => do_next.to_mut().absorb_after(downstream.as_ref(), self.cur_level.next()),
             None => self.insides.todo_now = Some(downstream),
         }
     }
 
-    fn reactions_triggered_by(&self, trigger: TriggerId) -> &'x ExecutableReactions<'x> {
+    fn reactions_triggered_by(&self, trigger: TriggerId) -> &'x ExecutableReactions<'x> {
         self.dataflow.reactions_triggered_by(&trigger)
     }
 
@@ -1213,7 +1214,7 @@
     /// Since the thread is allowed to keep references into the
     /// internals of the scheduler, it is joined when the scheduler
     /// shuts down. This means the scheduler will wait for the
-    /// thread to finish its task. For that reason, the thread's
+    /// thread to finish its task. For that reason, the thread's
     /// closure should not execute an infinite loop, it should at
     /// least check that the scheduler has not been terminated by
     /// polling [AsyncCtx::was_terminated].
@@ -1238,8 +1239,8 @@
     where
         // is there a practical reason to encapsulate this?
         F: FnOnce(&mut AsyncCtx) -> R,
-        F: Send + 'static,
-        R: Send + 'static,
+        F: Send + 'static,
+        R: Send + 'static,
     {
         let tx = self.rx.new_sender();
         let initial_time = self.initial_time;
@@ -1259,7 +1260,7 @@
     /// ```no_run
     /// # use reactor_rt::prelude::*;
     /// # let ctx: &mut ReactionCtx = panic!();
-    /// # let action: &mut LogicalAction<&'static str> = panic!();
+    /// # let action: &mut LogicalAction<&'static str> = panic!();
     /// // trigger shutdown on the next microstep
     /// ctx.request_stop(Asap);
     ///
@@ -1278,7 +1279,7 @@
 
     /// Reschedule a periodic timer if need be.
     /// This is called by a reaction synthesized for each timer.
-    // note: reactions can't call this as they're only passed a shared reference to a timer.
+    // note: reactions can't call this as they're only passed a shared reference to a timer.
     #[doc(hidden)]
     #[inline]
     pub fn reschedule_timer(&mut self, timer: &mut Timer) {
@@ -1290,11 +1291,11 @@
 
     /// Schedule the first triggering of the given timer.
     /// This is called by a reaction synthesized for each timer.
-    // note: reactions can't call this as they're only passed a shared references to timers.
+    // note: reactions can't call this as they're only passed a shared references to timers.
     #[doc(hidden)]
     #[inline]
     pub fn bootstrap_timer(&mut self, timer: &mut Timer) {
-        // we're in startup
+        // we're in startup
         let downstream = self.reactions_triggered_by(timer.get_id());
         if timer.offset.is_zero() {
             // no offset
@@ -1308,24 +1309,24 @@
     #[inline]
     pub(super) fn execute(&mut self, reactor: &mut ReactorBox, reaction_id: GlobalReactionId) {
         trace!(
-            "  - Executing {} (level {})",
+            "  - Executing {} (level {})",
             self.debug_info.display_reaction(reaction_id),
             self.cur_level
         );
-        debug_assert_eq!(reactor.id(), reaction_id.0.container(), "Wrong reactor");
+        debug_assert_eq!(reactor.id(), reaction_id.0.container(), "Wrong reactor");
         self.current_reaction.replace(reaction_id);
         reactor.react(self, reaction_id.0.local());
         self.current_reaction.take();
     }
 
     pub(super) fn new(
-        rx: &'a Receiver<PhysicalEvent>,
+        rx: &'a Receiver<PhysicalEvent>,
         tag: EventTag,
         initial_time: Instant,
-        todo: ReactionPlan<'x>,
-        dataflow: &'x DataflowInfo,
-        debug_info: DebugInfoProvider<'a>,
-        was_terminated_atomic: &'a Arc<AtomicBool>,
+        todo: ReactionPlan<'x>,
+        dataflow: &'x DataflowInfo,
+        debug_info: DebugInfoProvider<'a>,
+        was_terminated_atomic: &'a Arc<AtomicBool>,
         was_terminated: bool,
     ) -> Self {
         Self {
@@ -1344,7 +1345,7 @@
 
     /// Fork a context. Some things are shared, but not the
     /// mutable stuff.
-    #[cfg(feature = "parallel-runtime")]
+    #[cfg(feature = "parallel-runtime")]
     pub(super) fn fork(&self) -> Self {
         Self {
             insides: Default::default(),
@@ -1365,7 +1366,7 @@
 
 /// Info that executing reactions need to make known to the scheduler.
 #[derive(Default)]
-pub(super) struct RContextForwardableStuff<'x> {
+pub(super) struct RContextForwardableStuff<'x> {
     /// Remaining reactions to execute before the wave dies.
     /// Using [Option] and [Cow] optimises for the case where
     /// zero or exactly one port/action is set, and minimises
@@ -1374,15 +1375,15 @@
     /// This is mutable: if a reaction sets a port, then the
     /// downstream of that port is inserted in into this
     /// data structure.
-    pub(super) todo_now: ReactionPlan<'x>,
+    pub(super) todo_now: ReactionPlan<'x>,
 
     /// Events that were produced for a strictly greater
     /// logical time than a current one.
-    pub(super) future_events: SmallVec<[Event<'x>; 4]>,
+    pub(super) future_events: SmallVec<[Event<'x>; 4]>,
 }
 
-#[cfg(feature = "parallel-runtime")]
-impl RContextForwardableStuff<'_> {
+#[cfg(feature = "parallel-runtime")]
+impl RContextForwardableStuff<'_> {
     pub(super) fn merge(mut self, other: Self) -> Self {
         self.absorb(other);
         self
@@ -1395,7 +1396,7 @@
 }
 
 /// A type that can affect the logical event queue to implement
-/// asynchronous physical actions. This is a "link" to the event
+/// asynchronous physical actions. This is a "link" to the event
 /// system, from the outside world.
 ///
 /// See [ReactionCtx::spawn_physical_thread].
@@ -1410,7 +1411,7 @@
 
 impl AsyncCtx {
     /// Returns true if the scheduler has been shutdown. When
-    /// that's true, calls to other methods of this type will
+    /// that's true, calls to other methods of this type will
     /// fail with [SendError].
     pub fn was_terminated(&self) -> bool {
         self.was_terminated.load(Ordering::SeqCst)
@@ -1432,7 +1433,7 @@
 
         let evt = PhysicalEvent::terminate_at(tag);
         self.tx.send(evt).map_err(|e| {
-            warn!("Event could not be sent! {:?}", e);
+            warn!("Event could not be sent! {:?}", e);
             SendError(())
         })
     }
@@ -1486,7 +1487,7 @@
 
                 let evt = PhysicalEvent::trigger(tag, action.get_id());
                 self.tx.send(evt).map_err(|e| {
-                    warn!("Event could not be sent! {:?}", e);
+                    warn!("Event could not be sent! {:?}", e);
                     SendError(action.0.forget_value(&tag))
                 })
             })
@@ -1532,7 +1533,7 @@
     ///
     /// If the duration is zero (eg [Asap](Self::Asap)), it does not
     /// mean that the trigger will fire right away. For actions, the
-    /// action's inherent minimum delay must be taken into account,
+    /// action's inherent minimum delay must be taken into account,
     /// and even with a zero minimal delay, a delay of one microstep
     /// is applied.
     ///
@@ -1546,7 +1547,7 @@
 
     /// Specify that the trigger will fire as soon as possible.
     /// This does not mean that the action will trigger right away. The
-    /// action's inherent minimum delay must be taken into account,
+    /// action's inherent minimum delay must be taken into account,
     /// and even with a zero minimal delay, a delay of one microstep
     /// is applied. This is equivalent to
     /// ```
@@ -1582,17 +1583,17 @@
 
 /// Cleans up a tag
 /// TODO get rid of this!
-///  At least for multiports it's really bad
+///  At least for multiports it's really bad
 ///  Maybe we can keep a set of the ports that are present in ReactionCtx
 #[doc(hidden)]
 pub struct CleanupCtx {
-    /// Tag we're cleaning up
+    /// Tag we're cleaning up
     pub tag: EventTag,
 }
 
 impl CleanupCtx {
     pub fn cleanup_multiport<T: Sync>(&self, port: &mut Multiport<T>) {
-        // todo bound ports don't need to be cleared
+        // todo bound ports don't need to be cleared
         for channel in port {
             channel.clear_value()
         }
@@ -1610,5 +1611,4 @@
         action.use_mut(|a| a.0.forget_value(&self.tag)).ok();
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/scheduler/debug.rs.html b/src/reactor_rt/scheduler/debug.rs.html index 353523ee..1592b8c6 100644 --- a/src/reactor_rt/scheduler/debug.rs.html +++ b/src/reactor_rt/scheduler/debug.rs.html @@ -1,4 +1,5 @@ -debug.rs - source
1
+debug.rs - source
+    
1
 2
 3
 4
@@ -320,7 +321,7 @@
 320
 321
 322
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -333,7 +334,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -351,7 +352,7 @@
 use std::ops::Range;
 
 use index_vec::{Idx, IndexVec};
-use vecmap::VecMap;
+use crate::vecmap::VecMap;
 
 use crate::assembly::{ReactorInitializer, TriggerId};
 use crate::{GlobalReactionId, ReactorId};
@@ -371,7 +372,7 @@
 
     /// Labels of each trigger, every trigger id in the program
     /// is registered here.
-    trigger_infos: IndexVec<TriggerId, Cow<'static, str>>,
+    trigger_infos: IndexVec<TriggerId, Cow<'static, str>>,
 
     /// Maps each reactor id to the id of its container.
     /// The main reactor is not registered.
@@ -381,11 +382,11 @@
 
     // todo better data structure, eg IndexVec<ReactorId, IndexVec<LocalReactionId, _>>
     /// Labels of each reaction, only reactions that have one are in here.
-    reaction_labels: HashMap<GlobalReactionId, Cow<'static, str>>,
+    reaction_labels: HashMap<GlobalReactionId, Cow<'static, str>>,
 }
 
 /// The reactor ID, and the local index within the reactor.
-/// We don't use GlobalId because the second component is not
+/// We don't use GlobalId because the second component is not
 /// a LocalReactionId, for trigger ids it may be as big as
 /// usize, so we inflate LocalReactionId to usize.
 type RawId = (ReactorId, usize);
@@ -401,8 +402,8 @@
             main_reactor: None,
         };
 
-        assert_eq!(ich.trigger_infos.push(Cow::Borrowed("startup")), TriggerId::STARTUP);
-        assert_eq!(ich.trigger_infos.push(Cow::Borrowed("shutdown")), TriggerId::SHUTDOWN);
+        assert_eq!(ich.trigger_infos.push(Cow::Borrowed("startup")), TriggerId::STARTUP);
+        assert_eq!(ich.trigger_infos.push(Cow::Borrowed("shutdown")), TriggerId::SHUTDOWN);
 
         ich
     }
@@ -414,33 +415,33 @@
     }
 
     /// Format the id of a component.
-    fn fmt_component_path<'a>(
-        &'a self,
+    fn fmt_component_path<'a>(
+        &'a self,
         id: RawId,
-        label: Option<&'a Cow<'static, str>>,
+        label: Option<&'a Cow<'static, str>>,
         always_display_idx: bool,
-    ) -> impl Display + 'a {
-        struct PathFmt<'a> {
-            debug: &'a DebugInfoRegistry,
+    ) -> impl Display + 'a {
+        struct PathFmt<'a> {
+            debug: &'a DebugInfoRegistry,
             id: RawId,
-            label: Option<&'a Cow<'static, str>>,
+            label: Option<&'a Cow<'static, str>>,
             /// If true, the index is part of the output,
             /// even if the label is present.
             always_display_idx: bool,
         }
         use std::fmt::*;
-        impl Display for PathFmt<'_> {
+        impl Display for PathFmt<'_> {
             #[inline]
-            fn fmt(&self, f: &mut Formatter<'_>) -> Result {
-                write!(f, "{}", self.debug.get_debug_info(self.id.0))?;
+            fn fmt(&self, f: &mut Formatter<'_>) -> Result {
+                write!(f, "{}", self.debug.get_debug_info(self.id.0))?;
                 if let Some(label) = &self.label {
                     if self.always_display_idx {
-                        write!(f, "{}@{}", self.id.1, label)
+                        write!(f, "{}@{}", self.id.1, label)
                     } else {
-                        write!(f, "{}", label)
+                        write!(f, "{}", label)
                     }
                 } else {
-                    write!(f, "{}", self.id.1)
+                    write!(f, "{}", self.id.1)
                 }
             }
         }
@@ -449,13 +450,13 @@
     }
 
     #[inline]
-    pub fn fmt_reaction(&self, id: GlobalReactionId) -> impl Display + '_ {
+    pub fn fmt_reaction(&self, id: GlobalReactionId) -> impl Display + '_ {
         let raw = (id.0.container(), id.0.local().index());
         self.fmt_component_path(raw, self.reaction_labels.get(&id), true)
     }
 
     #[inline]
-    pub fn fmt_component(&self, id: TriggerId) -> impl Display + '_ {
+    pub fn fmt_component(&self, id: TriggerId) -> impl Display + '_ {
         self.fmt_component_path(self.raw_id_of_trigger(id), Some(&self.trigger_infos[id]), false)
     }
 
@@ -481,7 +482,7 @@
     fn raw_id_of_trigger(&self, id: TriggerId) -> RawId {
         match id {
             // Pretend startup and shutdown are in the last reactor.
-            // For programs built with LFC, it's the main reactor.
+            // For programs built with LFC, it's the main reactor.
             TriggerId::STARTUP | TriggerId::SHUTDOWN => {
                 let last_reactor = self.reactor_infos.last_idx();
                 let max_idx = *self.reactor_bound.last().unwrap();
@@ -491,8 +492,8 @@
 
             id => {
                 match self.reactor_bound.binary_search(&id) {
-                    // we're the upper bound of some reactor `rid`,
-                    // ie, we're the first component of the next reactor.
+                    // we're the upper bound of some reactor `rid`,
+                    // ie, we're the first component of the next reactor.
                     Ok(rid) => (rid.plus(1), 0usize),
                     // Here, rid is the reactor which contains the trigger.
                     // Eg if you have reactor_bound=[2, 4],
@@ -513,12 +514,12 @@
             .unwrap_or(TriggerId::FIRST_REGULAR)
     }
 
-    pub(crate) fn record_trigger(&mut self, id: TriggerId, name: Cow<'static, str>) {
+    pub(crate) fn record_trigger(&mut self, id: TriggerId, name: Cow<'static, str>) {
         let ix = self.trigger_infos.push(name);
         debug_assert_eq!(ix, id);
     }
 
-    pub(crate) fn record_reaction(&mut self, id: GlobalReactionId, name: Cow<'static, str>) {
+    pub(crate) fn record_reaction(&mut self, id: GlobalReactionId, name: Cow<'static, str>) {
         let existing = self.reaction_labels.insert(id, name);
         debug_assert!(existing.is_none())
     }
@@ -530,17 +531,17 @@
 
     pub(crate) fn record_main_reactor(&mut self, id: ReactorId) {
         let prev = self.main_reactor.replace(id);
-        assert!(prev.is_none(), "cannot call record_main twice");
+        assert!(prev.is_none(), "cannot call record_main twice");
     }
 
     pub(crate) fn record_reactor_container(&mut self, parent: ReactorId, child: ReactorId) {
         let ix = self.reactor_container.insert(child, parent);
-        debug_assert!(ix.is_none(), "overwrote reactor");
+        debug_assert!(ix.is_none(), "overwrote reactor");
     }
 
     pub(crate) fn set_id_range(&mut self, id: ReactorId, range: Range<TriggerId>) {
-        assert!(range.start <= range.end, "Malformed range {:?}", range);
-        assert!(range.start >= TriggerId::FIRST_REGULAR, "Trigger IDs 0-1 are reserved");
+        assert!(range.start <= range.end, "Malformed range {:?}", range);
+        assert!(range.start >= TriggerId::FIRST_REGULAR, "Trigger IDs 0-1 are reserved");
 
         let ix = self.reactor_bound.push(range.end);
         assert_eq!(ix, id);
@@ -551,11 +552,11 @@
 pub(crate) struct ReactorDebugInfo {
     /// Type name
     #[allow(unused)]
-    pub type_name: &'static str,
+    pub type_name: &'static str,
     /// Simple name of the instantiation (last segment of the path)
     #[allow(unused)]
-    pub inst_name: &'static str,
-    /// Path to this instantiation, with trailing slash (eg `"/parent/child/"`)
+    pub inst_name: &'static str,
+    /// Path to this instantiation, with trailing slash (eg `"/parent/child/"`)
     inst_path: String,
 }
 
@@ -568,10 +569,10 @@
     #[cfg(test)]
     pub(crate) fn test_named(inst_path: impl Into<String>) -> Self {
         let mut inst_path = inst_path.into();
-        inst_path.push('/');
+        inst_path.push('/');
         Self {
-            type_name: "unknown",
-            inst_name: "unknown",
+            type_name: "unknown",
+            inst_name: "unknown",
             inst_path,
         }
     }
@@ -579,31 +580,31 @@
     pub(crate) fn root<R>() -> Self {
         Self {
             type_name: type_name::<R>(),
-            inst_name: "/",
-            inst_path: "/".into(),
+            inst_name: "/",
+            inst_path: "/".into(),
         }
     }
 
-    pub(crate) fn derive<R: ReactorInitializer>(&self, inst_name: &'static str) -> Self {
+    pub(crate) fn derive<R: ReactorInitializer>(&self, inst_name: &'static str) -> Self {
         Self {
             type_name: type_name::<R::Wrapped>(),
             inst_name,
-            inst_path: format!("{}{}/", self.inst_path, inst_name),
+            inst_path: format!("{}{}/", self.inst_path, inst_name),
         }
     }
 
-    pub(crate) fn derive_bank_item<R: ReactorInitializer>(&self, inst_name: &'static str, bank_idx: usize) -> Self {
+    pub(crate) fn derive_bank_item<R: ReactorInitializer>(&self, inst_name: &'static str, bank_idx: usize) -> Self {
         Self {
             type_name: type_name::<R::Wrapped>(),
             inst_name,
-            inst_path: format!("{}{}[{}]/", self.inst_path, inst_name, bank_idx),
+            inst_path: format!("{}{}[{}]/", self.inst_path, inst_name, bank_idx),
         }
     }
 }
 
 impl Display for ReactorDebugInfo {
-    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
-        write!(f, "{}", self.inst_path)
+    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
+        write!(f, "{}", self.inst_path)
     }
 }
 
@@ -618,16 +619,16 @@
         let mut trigger_id = TriggerId::FIRST_REGULAR;
         let reactor_0 = ReactorId::new(0);
         let first_trigger = trigger_id;
-        debug.record_reactor(reactor_0, ReactorDebugInfo::test_named("foo"));
-        debug.record_trigger(trigger_id.get_and_incr()?, "t0".into());
-        debug.record_trigger(trigger_id.get_and_incr()?, "t1".into());
+        debug.record_reactor(reactor_0, ReactorDebugInfo::test_named("foo"));
+        debug.record_trigger(trigger_id.get_and_incr()?, "t0".into());
+        debug.record_trigger(trigger_id.get_and_incr()?, "t1".into());
         debug.set_id_range(reactor_0, first_trigger..trigger_id);
 
         let reactor_1 = ReactorId::new(1);
         let first_trigger = trigger_id;
-        debug.record_reactor(reactor_1, ReactorDebugInfo::test_named("foo1"));
-        debug.record_trigger(trigger_id.get_and_incr()?, "t0".into());
-        debug.record_trigger(trigger_id.get_and_incr()?, "t1".into());
+        debug.record_reactor(reactor_1, ReactorDebugInfo::test_named("foo1"));
+        debug.record_trigger(trigger_id.get_and_incr()?, "t0".into());
+        debug.record_trigger(trigger_id.get_and_incr()?, "t1".into());
         debug.set_id_range(reactor_1, first_trigger..trigger_id);
 
         let mut trigger_id = TriggerId::FIRST_REGULAR;
@@ -642,5 +643,4 @@
         Ok(())
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/scheduler/dependencies.rs.html b/src/reactor_rt/scheduler/dependencies.rs.html index b0a9be9b..17aa2040 100644 --- a/src/reactor_rt/scheduler/dependencies.rs.html +++ b/src/reactor_rt/scheduler/dependencies.rs.html @@ -1,4 +1,5 @@ -dependencies.rs - source
1
+dependencies.rs - source
+    
1
 2
 3
 4
@@ -977,7 +978,7 @@
 977
 978
 979
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -990,7 +991,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -1067,7 +1068,7 @@
 
 type DepGraphImpl = DiGraph<GraphNode, EdgeWeight, GlobalIdImpl>;
 
-/// Dependency graph representing "instantaneous" dependencies,
+/// Dependency graph representing "instantaneous" dependencies,
 /// ie read- and write-dependencies of reactions to ports, and
 /// their trigger dependencies. This must be a DAG.
 ///
@@ -1102,12 +1103,12 @@
 }
 
 impl Debug for GraphNode {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
         match self {
-            GraphNode { id: GraphId::Reaction(id), .. } => write!(f, "Reaction({:?})", id),
-            GraphNode { id: GraphId::Trigger(TriggerId::STARTUP), .. } => write!(f, "startup"),
-            GraphNode { id: GraphId::Trigger(TriggerId::SHUTDOWN), .. } => write!(f, "shutdown"),
-            GraphNode { id: GraphId::Trigger(id), kind } => write!(f, "{:?}({:?})", kind, id.index()),
+            GraphNode { id: GraphId::Reaction(id), .. } => write!(f, "Reaction({:?})", id),
+            GraphNode { id: GraphId::Trigger(TriggerId::STARTUP), .. } => write!(f, "startup"),
+            GraphNode { id: GraphId::Trigger(TriggerId::SHUTDOWN), .. } => write!(f, "shutdown"),
+            GraphNode { id: GraphId::Trigger(id), kind } => write!(f, "{:?}({:?})", kind, id.index()),
         }
     }
 }
@@ -1132,19 +1133,19 @@
         use petgraph::dot::{Config, Dot};
 
         // Map the node weights to nice strings.
-        // petgraph doesn't support custom node formatters
+        // petgraph doesn't support custom node formatters
         // https://github.com/petgraph/petgraph/issues/194
         let labeled = self.dataflow.map(
             |_, n| match n.id {
-                GraphId::Reaction(id) => format!("Reaction({})", id_registry.fmt_reaction(id)),
-                GraphId::Trigger(TriggerId::STARTUP) => "startup".to_string(),
-                GraphId::Trigger(TriggerId::SHUTDOWN) => "shutdown".to_string(),
-                GraphId::Trigger(id) => format!("{:?}({})", n.kind, id_registry.fmt_component(id)),
+                GraphId::Reaction(id) => format!("Reaction({})", id_registry.fmt_reaction(id)),
+                GraphId::Trigger(TriggerId::STARTUP) => "startup".to_string(),
+                GraphId::Trigger(TriggerId::SHUTDOWN) => "shutdown".to_string(),
+                GraphId::Trigger(id) => format!("{:?}({})", n.kind, id_registry.fmt_component(id)),
             },
-            |_, _| "",
+            |_, _| "",
         );
 
-        format!("{}", Dot::with_config(&labeled, &[Config::EdgeNoLabel]))
+        format!("{}", Dot::with_config(&labeled, &[Config::EdgeNoLabel]))
     }
 
     pub(super) fn record_port(&mut self, id: TriggerId) {
@@ -1164,13 +1165,13 @@
     /// ```
     ///
     /// That way when someone declares a trigger on the bank,
-    /// it's forwarded to individual channels in the graph.
+    /// it's forwarded to individual channels in the graph.
     ///
     /// When X declares a trigger/uses on the entire
     /// bank, an edge is added from every channel to X.
     ///
     pub(super) fn record_port_bank(&mut self, id: TriggerId, len: usize) -> Result<(), AssemblyError> {
-        assert!(len > 0, "empty port bank");
+        assert!(len > 0, "empty port bank");
         self.record(GraphId::Trigger(id), NodeKind::MultiportUpstream);
 
         for channel_id in id
@@ -1265,7 +1266,7 @@
 
     fn record(&mut self, id: GraphId, kind: NodeKind) -> GraphIx {
         match self.ix_by_id.entry(id) {
-            HEntry::Occupied(_) => panic!("Duplicate id {:?}", id),
+            HEntry::Occupied(_) => panic!("Duplicate id {:?}", id),
             HEntry::Vacant(v) => {
                 let ix = self.dataflow.add_node(GraphNode { kind, id });
                 v.insert(ix);
@@ -1318,7 +1319,7 @@
     /// Default semantics for this edge (determined by the
     /// kind of source and target vertex). This only makes a
     /// difference for edges from a port/action to a reaction:
-    /// if they're labeled `Default`, they're trigger dependencies,
+    /// if they're labeled `Default`, they're trigger dependencies,
     /// otherwise use dependencies.
     Default,
     ///
@@ -1344,7 +1345,7 @@
             .level_numbers
             .get(&reaction)
             .copied()
-            .expect("reaction was not recorded in the graph");
+            .expect("reaction was not recorded in the graph");
         collection.insert(reaction, ix);
     }
 }
@@ -1355,7 +1356,7 @@
     /// Maps each trigger to the set of reactions that need
     /// to be scheduled when it is triggered.
     /// Todo: many of those are never asked for, eg those of bound ports
-    trigger_to_plan: IndexVec<TriggerId, Arc<ExecutableReactions<'static>>>,
+    trigger_to_plan: IndexVec<TriggerId, Arc<ExecutableReactions<'static>>>,
 }
 
 impl DataflowInfo {
@@ -1369,14 +1370,14 @@
     fn collect_trigger_to_plan(
         DepGraph { dataflow, .. }: &mut DepGraph,
         level_info: &ReactionLevelInfo,
-    ) -> IndexVec<TriggerId, Arc<ExecutableReactions<'static>>> {
+    ) -> IndexVec<TriggerId, Arc<ExecutableReactions<'static>>> {
         let mut result = IndexVec::with_capacity(dataflow.node_count() / 2);
 
         for trigger in dataflow.node_indices() {
             if let GraphId::Trigger(trigger_id) = dataflow[trigger].id {
                 // if let Some(_multiport_id) = multiport_containment.get(&dataflow[trigger].id) {
                 //     assert_eq!(dataflow[trigger].kind, NodeKind::Port);
-                //     todo!("multiports")
+                //     todo!("multiports")
                 // todo this is a multiport channel:
                 //  1. if someone has declared a dependency on this individual channel, collect dependencies into DEPS
                 //  2. else add trigger to DELAY goto 4
@@ -1400,7 +1401,7 @@
         dataflow: &DepGraphImpl,
         trigger: GraphIx,
         level_info: &ReactionLevelInfo,
-        reactions: &mut ExecutableReactions<'static>,
+        reactions: &mut ExecutableReactions<'static>,
     ) {
         for downstream in dataflow.edges_directed(trigger, Outgoing) {
             let node = &dataflow[downstream.target()];
@@ -1412,17 +1413,17 @@
                 NodeKind::Reaction => {
                     let rid = match node.id {
                         GraphId::Reaction(rid) => rid,
-                        _ => unreachable!("this is a reaction"),
+                        _ => unreachable!("this is a reaction"),
                     };
                     // trigger->reaction
                     if downstream.weight() != &EdgeWeight::Use {
-                        // so it's a trigger dependency
+                        // so it's a trigger dependency
                         level_info.augment(reactions, rid)
                     }
                 }
                 _ => {
                     // trigger->action? this is malformed
-                    panic!("malformed dependency graph")
+                    panic!("malformed dependency graph")
                 }
             }
         }
@@ -1434,13 +1435,13 @@
     /// # Panics
     ///
     /// If the trigger id is not registered
-    pub fn reactions_triggered_by(&self, trigger: &TriggerId) -> &ExecutableReactions<'static> {
+    pub fn reactions_triggered_by(&self, trigger: &TriggerId) -> &ExecutableReactions<'static> {
         &self.trigger_to_plan[*trigger]
     }
 }
 
 cfg_if! {
-    if #[cfg(feature = "vec-id-sets")] {
+    if #[cfg(feature = "vec-id-sets")] {
         type LevelImpl = Vec<GlobalReactionId>;
     } else {
         type LevelImpl = std::collections::HashSet<GlobalReactionId>;
@@ -1465,7 +1466,7 @@
 
     fn insert(&mut self, id: GlobalReactionId) {
         cfg_if! {
-            if #[cfg(feature = "vec-id-sets")] {
+            if #[cfg(feature = "vec-id-sets")] {
                  match self.0.binary_search(&id) {
                     Ok(_) => {}
                     Err(ix) => {
@@ -1485,21 +1486,21 @@
     fn extend(&mut self, iter: impl Iterator<Item = GlobalReactionId>) {
         self.0.extend(iter);
         cfg_if! {
-            if #[cfg(feature = "vec-id-sets")] {
+            if #[cfg(feature = "vec-id-sets")] {
                 self.0.sort();
                 self.0.dedup();
             }
         }
     }
 
-    pub fn iter(&self) -> impl Iterator<Item = GlobalReactionId> + '_ {
+    pub fn iter(&self) -> impl Iterator<Item = GlobalReactionId> + '_ {
         self.0.iter().cloned()
     }
 }
 
-impl<'a> IntoIterator for &'a Level {
-    type Item = &'a GlobalReactionId;
-    type IntoIter = <&'a LevelImpl as IntoIterator>::IntoIter;
+impl<'a> IntoIterator for &'a Level {
+    type Item = &'a GlobalReactionId;
+    type IntoIter = <&'a LevelImpl as IntoIterator>::IntoIter;
 
     fn into_iter(self) -> Self::IntoIter {
         (self.0).iter()
@@ -1529,8 +1530,8 @@
 }
 
 impl Display for LevelIx {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(f, "{}", self.0)
+    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{}", self.0)
     }
 }
 
@@ -1545,7 +1546,7 @@
 /// 1. they may be merged together (by a [DataflowInfo]).
 /// 2. merging two plans eliminates duplicates
 #[derive(Clone, Debug, Default)]
-pub struct ExecutableReactions<'x> {
+pub struct ExecutableReactions<'x> {
     /// An ordered list of levels to execute.
     ///
     /// It must by construction be the case that a reaction
@@ -1562,10 +1563,10 @@
     ///
     /// Note also that the last level in the list must be
     /// non-empty by construction.
-    levels: VecMap<LevelIx, Cow<'x, Level>>,
+    levels: VecMap<LevelIx, Cow<'x, Level>>,
 }
 
-impl<'x> ExecutableReactions<'x> {
+impl<'x> ExecutableReactions<'x> {
     pub fn new() -> Self {
         Self { levels: VecMap::new() }
     }
@@ -1574,7 +1575,7 @@
     /// with their level. Note that this does not mutate this collection
     /// (eg drain it), because that way we can use borrowed Cows
     /// and avoid more allocation.
-    pub fn batches(&self) -> impl Iterator<Item = &(LevelIx, Cow<'x, Level>)> + '_ {
+    pub fn batches(&self) -> impl Iterator<Item = &(LevelIx, Cow<'x, Level>)> + '_ {
         self.levels.iter()
     }
 
@@ -1583,7 +1584,7 @@
     }
 
     #[inline]
-    pub fn next_batch<'a>(&'a self, min_level_exclusive: KeyRef<&LevelIx>) -> Option<(KeyRef<&'a LevelIx>, &Level)> {
+    pub fn next_batch<'a>(&'a self, min_level_exclusive: KeyRef<&LevelIx>) -> Option<(KeyRef<&'a LevelIx>, &Level)> {
         self.levels
             .next_mapping(min_level_exclusive)
             .map(|(ix, cow)| (ix, cow.as_ref()))
@@ -1596,13 +1597,13 @@
 
     /// Merge the given set of reactions into this one.
     /// Ignore levels that come strictly before `min_level_inclusive`, may even clear them.
-    pub fn absorb_after(&mut self, src: &ExecutableReactions<'x>, min_level_inclusive: LevelIx) {
+    pub fn absorb_after(&mut self, src: &ExecutableReactions<'x>, min_level_inclusive: LevelIx) {
         let src = &src.levels;
         let dst = &mut self.levels;
 
         // Find the next mapping >= to the min level.
-        // We don't care about the mappings that come before.
-        // If there is none we won't loop at all.
+        // We don't care about the mappings that come before.
+        // If there is none we won't loop at all.
         let mut next_src = src.find_random_mapping_after(min_level_inclusive);
         let mut dst_position_hint: Option<KeyRef<LevelIx>> = None;
 
@@ -1648,17 +1649,17 @@
     }
 
     /// Fully merge plans of `x` and `y`.
-    pub(super) fn merge_cows(x: ReactionPlan<'x>, y: ReactionPlan<'x>) -> ReactionPlan<'x> {
+    pub(super) fn merge_cows(x: ReactionPlan<'x>, y: ReactionPlan<'x>) -> ReactionPlan<'x> {
         Self::merge_plans_after(x, y, LevelIx::ZERO)
     }
 
-    // todo would be nice to simplify this, it's hot
+    // todo would be nice to simplify this, it's hot
     /// Produce the set union of two reaction plans.
     /// Levels below the `min_level` are not merged, and the caller
-    /// shouldn't query them. For all levels >= `min_level`,
+    /// shouldn't query them. For all levels >= `min_level`,
     /// the produced reaction plan has all the reactions of
     /// `x` and `y` for that level.
-    pub(super) fn merge_plans_after(x: ReactionPlan<'x>, y: ReactionPlan<'x>, min_level: LevelIx) -> ReactionPlan<'x> {
+    pub(super) fn merge_plans_after(x: ReactionPlan<'x>, y: ReactionPlan<'x>, min_level: LevelIx) -> ReactionPlan<'x> {
         match (x, y) {
             (x, None) | (None, x) => x,
             (Some(x), y) | (y, Some(x)) if x.max_level() < min_level => y,
@@ -1678,13 +1679,13 @@
     }
 }
 
-impl Display for ExecutableReactions<'_> {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(f, "[")?;
+impl Display for ExecutableReactions<'_> {
+    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+        write!(f, "[")?;
         for (_, level) in self.levels.iter() {
-            join_to!(f, level.iter(), ", ", "{", "} ; ")?;
+            join_to!(f, level.iter(), ", ", "{", "} ; ")?;
         }
-        write!(f, "]")
+        write!(f, "]")
     }
 }
 
@@ -1729,17 +1730,17 @@
 
         #[allow(unused)]
         fn eprintln_graph(&self) {
-            eprintln!("{}", self.graph.format_dot(&self.debug_info));
+            eprintln!("{}", self.graph.format_dot(&self.debug_info));
         }
     }
 
-    struct TestAssembler<'a> {
-        fixture: &'a mut TestGraphFixture,
+    struct TestAssembler<'a> {
+        fixture: &'a mut TestGraphFixture,
         reactor_id: ReactorId,
         first_trigger_id: TriggerId,
     }
 
-    impl TestAssembler<'_> {
+    impl TestAssembler<'_> {
         fn new_reactions<const N: usize>(&mut self) -> [GlobalReactionId; N] {
             let result = array![i => GlobalReactionId::new(self.reactor_id, LocalReactionId::from_usize(i)); N];
             let mut last = None;
@@ -1753,7 +1754,7 @@
             result
         }
 
-        fn new_ports<const N: usize>(&mut self, names: [&'static str; N]) -> [TriggerId; N] {
+        fn new_ports<const N: usize>(&mut self, names: [&'static str; N]) -> [TriggerId; N] {
             let result = array![_ => self.fixture.next_trigger_id.get_and_incr().unwrap(); N];
             for (i, p) in (&result).iter().enumerate() {
                 self.fixture.graph.record_port(*p);
@@ -1763,7 +1764,7 @@
         }
     }
 
-    impl Drop for TestAssembler<'_> {
+    impl Drop for TestAssembler<'_> {
         fn drop(&mut self) {
             let range = self.first_trigger_id..self.fixture.next_trigger_id;
             self.fixture.debug_info.set_id_range(self.reactor_id, range)
@@ -1816,9 +1817,9 @@
     fn test_level_assignment_simple() {
         let mut test = TestGraphFixture::new();
 
-        let mut builder = test.new_reactor("main");
+        let mut builder = test.new_reactor("main");
         let [n1, n2] = builder.new_reactions();
-        let [p0] = builder.new_ports(["p0"]);
+        let [p0] = builder.new_ports(["p0"]);
         drop(builder);
 
         test.graph.reaction_effects(n1, p0);
@@ -1832,9 +1833,9 @@
     fn test_level_assignment_diamond_1() {
         let mut test = TestGraphFixture::new();
 
-        let mut builder = test.new_reactor("main");
+        let mut builder = test.new_reactor("main");
         let [n1, n2] = builder.new_reactions();
-        let [p0, p1] = builder.new_ports(["p0", "p1"]);
+        let [p0, p1] = builder.new_ports(["p0", "p1"]);
         drop(builder);
 
         test.graph.reaction_effects(n1, p0);
@@ -1851,16 +1852,16 @@
     fn test_level_assignment_diamond_1_exponential() {
         let mut test = TestGraphFixture::new();
 
-        let mut builder = test.new_reactor("top");
-        let [mut prev_in] = builder.new_ports(["in"]);
+        let mut builder = test.new_reactor("top");
+        let [mut prev_in] = builder.new_ports(["in"]);
         drop(builder);
 
         // the number of paths in the graph is exponential
         // in this upper bound, here 3^60.
         for reactor_id in 0..60 {
-            let mut builder = test.new_reactor(format!("r[{}]", reactor_id));
+            let mut builder = test.new_reactor(format!("r[{}]", reactor_id));
             let [n1, n2] = builder.new_reactions();
-            let [p0, p1, out] = builder.new_ports(["p0", "p1", "out"]);
+            let [p0, p1, out] = builder.new_ports(["p0", "p1", "out"]);
             drop(builder);
 
             // make a diamond
@@ -1887,16 +1888,16 @@
     fn test_level_assignment_diamond_depth2_exponential() {
         let mut test = TestGraphFixture::new();
 
-        let mut builder = test.new_reactor("top");
-        let [mut prev_in] = builder.new_ports(["in"]);
+        let mut builder = test.new_reactor("top");
+        let [mut prev_in] = builder.new_ports(["in"]);
         drop(builder);
 
         // the number of paths in the graph is exponential
         // in this upper bound, here 3^60.
         for reactor_id in 0..60 {
-            let mut builder = test.new_reactor(format!("r[{}]", reactor_id));
+            let mut builder = test.new_reactor(format!("r[{}]", reactor_id));
             let [n1, n2] = builder.new_reactions();
-            let [p0, p01, p1, p11, out] = builder.new_ports(["p0", "p01", "p1", "p11", "out"]);
+            let [p0, p01, p1, p11, out] = builder.new_ports(["p0", "p01", "p1", "p11", "out"]);
             drop(builder);
 
             // make a diamond OF DEPTH > 1
@@ -1927,9 +1928,9 @@
     fn test_graph_dump() {
         let mut test = TestGraphFixture::new();
 
-        let mut builder = test.new_reactor("main");
+        let mut builder = test.new_reactor("main");
         let [n1, n2] = builder.new_reactions();
-        let [p0, p1] = builder.new_ports(["p0", "p1"]);
+        let [p0, p1] = builder.new_ports(["p0", "p1"]);
         drop(builder);
 
         test.graph.reaction_effects(n1, p0);
@@ -1939,22 +1940,21 @@
 
         assert_eq!(
             test.graph.format_dot(&test.debug_info),
-            r#"digraph {
-    0 [ label = "startup" ]
-    1 [ label = "shutdown" ]
-    2 [ label = "Reaction(main/0)" ]
-    3 [ label = "Reaction(main/1)" ]
-    4 [ label = "Port(main/p0)" ]
-    5 [ label = "Port(main/p1)" ]
+            r#"digraph {
+    0 [ label = "startup" ]
+    1 [ label = "shutdown" ]
+    2 [ label = "Reaction(main/0)" ]
+    3 [ label = "Reaction(main/1)" ]
+    4 [ label = "Port(main/p0)" ]
+    5 [ label = "Port(main/p1)" ]
     2 -> 3 [ ]
     2 -> 4 [ ]
     2 -> 5 [ ]
     4 -> 3 [ ]
     5 -> 3 [ ]
 }
-"#
+"#
         );
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/scheduler/events.rs.html b/src/reactor_rt/scheduler/events.rs.html index 7a760dbc..d935a09a 100644 --- a/src/reactor_rt/scheduler/events.rs.html +++ b/src/reactor_rt/scheduler/events.rs.html @@ -1,4 +1,5 @@ -events.rs - source
1
+events.rs - source
+    
1
 2
 3
 4
@@ -231,7 +232,7 @@
 231
 232
 233
-
use std::borrow::Cow;
+
use std::borrow::Cow;
 use std::collections::VecDeque;
 use std::fmt::{Display, Formatter};
 use std::time::Instant;
@@ -346,11 +347,11 @@
 }
 
 impl Display for EventTag {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
         let elapsed = self.offset_from_t0;
         write!(
             f,
-            "(T0 + {} ns = {} ms, {})",
+            "(T0 + {} ns = {} ms, {})",
             elapsed.as_nanos(),
             elapsed.as_millis(),
             self.microstep
@@ -365,26 +366,26 @@
 /// [self::AsyncCtx] may only communicate with
 /// the scheduler by sending events.
 #[derive(Debug)]
-pub(super) struct Event<'x> {
+pub(super) struct Event<'x> {
     /// The tag at which the reactions to this event must be executed.
     /// This is always > to the latest *processed* tag, by construction
     /// of the reactor application.
     pub(super) tag: EventTag,
     /// A set of reactions to execute.
-    pub reactions: ReactionPlan<'x>,
+    pub reactions: ReactionPlan<'x>,
     /// Whether we should terminate the application at
     /// the tag of this event (after processing the tag).
     pub terminate: bool,
 }
 
-impl<'x> Event<'x> {
-    pub fn absorb(&mut self, other: Event<'x>) {
+impl<'x> Event<'x> {
+    pub fn absorb(&mut self, other: Event<'x>) {
         debug_assert_eq!(self.tag, other.tag);
         self.reactions = ExecutableReactions::merge_cows(self.reactions.take(), other.reactions);
         self.terminate |= other.terminate;
     }
 
-    pub fn execute(tag: EventTag, reactions: Cow<'x, ExecutableReactions<'x>>) -> Self {
+    pub fn execute(tag: EventTag, reactions: Cow<'x, ExecutableReactions<'x>>) -> Self {
         Self { tag, reactions: Some(reactions), terminate: false }
     }
     pub fn terminate_at(tag: EventTag) -> Self {
@@ -426,30 +427,30 @@
 /// A queue of pending [Event]s. Events are ordered by tag,
 /// so this is not a FIFO queue.
 #[derive(Default)]
-pub(super) struct EventQueue<'x> {
+pub(super) struct EventQueue<'x> {
     /// This list is sorted by the tag of each event (in ascending order).
     ///
-    /// But insertion is at worse O(n)... And it's easy to build
+    /// But insertion is at worse O(n)... And it's easy to build
     /// a pathological program where this worse case is always hit.
     /// Theoretically using a tree/ heap would be useful here.
     ///        .
     ///       ..
     ///      ...
     ///     ....
-    value_list: VecDeque<Event<'x>>,
+    value_list: VecDeque<Event<'x>>,
 }
 
-impl<'x> EventQueue<'x> {
+impl<'x> EventQueue<'x> {
     /// Removes and returns the earliest tag
-    pub fn take_earliest(&mut self) -> Option<Event<'x>> {
+    pub fn take_earliest(&mut self) -> Option<Event<'x>> {
         self.value_list.pop_front()
     }
 
     // todo perf: we could make a more optimal function to push a
     //  lot of events at once. Consider the following algorithm:
     //  - start with a sorted `self.value_list` and a (non-sorted) `new_evts: Vec<Event>`
-    //  - sort the new events in place (in a Cow maybe). They'll
-    //  probably come in already sorted but we can't assume this.
+    //  - sort the new events in place (in a Cow maybe). They'll
+    //  probably come in already sorted but we can't assume this.
     //  Use an algorithm that best-cases for sorted data. (eg https://crates.io/crates/dmsort)
     //  - take the earliest new event and binary search to insert it.
     //  - then do the same thing but only on the remaining (to the right)
@@ -457,12 +458,11 @@
     //  sort.
 
     /// Push an event into the heap.
-    pub(super) fn push(&mut self, evt: Event<'x>) {
+    pub(super) fn push(&mut self, evt: Event<'x>) {
         match self.value_list.binary_search_by_key(&evt.tag, |e| e.tag) {
             Ok(idx) => self.value_list[idx].absorb(evt),
             Err(idx) => self.value_list.insert(idx, evt),
         }
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/scheduler/mod.rs.html b/src/reactor_rt/scheduler/mod.rs.html index 1f0e1f13..eac58dd1 100644 --- a/src/reactor_rt/scheduler/mod.rs.html +++ b/src/reactor_rt/scheduler/mod.rs.html @@ -1,4 +1,5 @@ -mod.rs - source
1
+mod.rs - source
+    
1
 2
 3
 4
@@ -91,7 +92,7 @@
 91
 92
 93
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -104,7 +105,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -133,28 +134,28 @@
 mod events;
 mod scheduler_impl;
 
-#[cfg(feature = "public-internals")]
+#[cfg(feature = "public-internals")]
 pub mod internals {
     pub use super::dependencies::{ExecutableReactions, Level, LevelIx, ReactionLevelInfo};
 }
 
-pub(self) type ReactionPlan<'x> = Option<Cow<'x, ExecutableReactions<'x>>>;
-pub(self) type ReactorBox<'a> = Box<dyn ReactorBehavior + 'a>;
-pub(self) type ReactorVec<'a> = IndexVec<ReactorId, ReactorBox<'a>>;
+pub(self) type ReactionPlan<'x> = Option<Cow<'x, ExecutableReactions<'x>>>;
+pub(self) type ReactorBox<'a> = Box<dyn ReactorBehavior + 'a>;
+pub(self) type ReactorVec<'a> = IndexVec<ReactorId, ReactorBox<'a>>;
 
 /// Can format stuff for trace messages.
 #[derive(Clone)]
-pub(self) struct DebugInfoProvider<'a> {
-    id_registry: &'a DebugInfoRegistry,
+pub(self) struct DebugInfoProvider<'a> {
+    id_registry: &'a DebugInfoRegistry,
 }
 
-impl DebugInfoProvider<'_> {
+impl DebugInfoProvider<'_> {
     pub(self) fn display_event(&self, evt: &Event) -> String {
         let Event { tag, reactions, terminate } = evt;
-        let mut str = format!("at {}: run {}", tag, self.display_reactions(reactions));
+        let mut str = format!("at {}: run {}", tag, self.display_reactions(reactions));
 
         if *terminate {
-            str += ", then terminate"
+            str += ", then terminate"
         }
         str
     }
@@ -162,27 +163,26 @@
     pub(self) fn display_reactions(&self, reactions: &ReactionPlan) -> String {
         use std::fmt::*;
 
-        let mut str = "[".to_string();
+        let mut str = "[".to_string();
 
         if let Some(reactions) = reactions {
             for (level_no, batch) in reactions.batches() {
-                write!(str, "{}: ", level_no).unwrap();
-                join_to!(&mut str, batch.iter(), ", ", "{", "}", |x| format!(
-                    "{}",
+                write!(str, "{}: ", level_no).unwrap();
+                join_to!(&mut str, batch.iter(), ", ", "{", "}", |x| format!(
+                    "{}",
                     self.display_reaction(x)
                 ))
                 .unwrap();
             }
         }
 
-        str += "]";
+        str += "]";
         str
     }
 
     #[inline]
-    pub(self) fn display_reaction(&self, id: GlobalReactionId) -> impl Display + '_ {
+    pub(self) fn display_reaction(&self, id: GlobalReactionId) -> impl Display + '_ {
         self.id_registry.fmt_reaction(id)
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/scheduler/scheduler_impl.rs.html b/src/reactor_rt/scheduler/scheduler_impl.rs.html index 4f4722cf..5b5d154a 100644 --- a/src/reactor_rt/scheduler/scheduler_impl.rs.html +++ b/src/reactor_rt/scheduler/scheduler_impl.rs.html @@ -1,4 +1,5 @@ -scheduler_impl.rs - source
1
+scheduler_impl.rs - source
+    
1
 2
 3
 4
@@ -506,7 +507,7 @@
 506
 507
 508
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -519,7 +520,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -545,12 +546,12 @@
 
 /// Construction parameters for the scheduler.
 ///
-/// LFC uses target properties to set them. With the "cli"
+/// LFC uses target properties to set them. With the "cli"
 /// feature, generated programs also feature CLI options to
 /// override the defaults at runtime.
 #[derive(Default)]
 pub struct SchedulerOptions {
-    /// If true, we won't shut down the scheduler as soon as
+    /// If true, we won't shut down the scheduler as soon as
     /// the event queue is empty, provided there are still
     /// live threads that can send messages to the scheduler
     /// asynchronously.
@@ -572,9 +573,9 @@
 }
 
 // Macros are placed a bit out of order to avoid exporting them
-// (they're only visible in code placed AFTER them).
+// (they're only visible in code placed AFTER them).
 // We use macros instead of private methods as the borrow checker
-// needs to know we're borrowing disjoint parts of self at any time.
+// needs to know we're borrowing disjoint parts of self at any time.
 
 macro_rules! debug_info {
     ($e:expr) => {
@@ -584,30 +585,30 @@
 
 macro_rules! push_event {
     ($scheduler:expr, $evt:expr) => {{
-        trace!("Pushing {}", debug_info!($scheduler).display_event(&$evt));
+        trace!("Pushing {}", debug_info!($scheduler).display_event(&$evt));
         $scheduler.event_queue.push($evt);
     }};
 }
 
 /// The runtime scheduler.
 ///
-/// Lifetime parameters: 'x and 't are carried around everywhere,
-/// 'x allows us to take references into the dataflow graph, and
-/// 't to spawn new scoped threads for physical actions. 'a is more
+/// Lifetime parameters: 'x and 't are carried around everywhere,
+/// 'x allows us to take references into the dataflow graph, and
+/// 't to spawn new scoped threads for physical actions. 'a is more
 /// useless but is needed to compile.
-pub struct SyncScheduler<'x> {
+pub struct SyncScheduler<'x> {
     /// The latest processed logical time (necessarily behind physical time).
     latest_processed_tag: Option<EventTag>,
 
     /// Reference to the data flow graph, which allows us to
     /// order reactions properly for each tag.
-    dataflow: &'x DataflowInfo,
+    dataflow: &'x DataflowInfo,
 
     /// All reactors.
-    reactors: ReactorVec<'x>,
+    reactors: ReactorVec<'x>,
 
     /// Pending events/ tags to process.
-    event_queue: EventQueue<'x>,
+    event_queue: EventQueue<'x>,
 
     /// Receiver through which asynchronous events are
     /// communicated to the scheduler. We only block when
@@ -635,49 +636,49 @@
     id_registry: DebugInfoRegistry,
 }
 
-impl<'x> SyncScheduler<'x> {
-    pub fn run_main<R: ReactorInitializer + 'static>(options: SchedulerOptions, args: R::Params) {
+impl<'x> SyncScheduler<'x> {
+    pub fn run_main<R: ReactorInitializer + 'static>(options: SchedulerOptions, args: R::Params) {
         let start = Instant::now();
-        info!("Starting assembly...");
+        info!("Starting assembly...");
         let (reactors, graph, id_registry) = RootAssembler::assemble_tree::<R>(args);
         let time = Instant::now() - start;
-        info!("Assembly done in {} µs...", time.as_micros());
+        info!("Assembly done in {} µs...", time.as_micros());
 
         if options.dump_graph {
             use std::fs::File;
             use std::io::Write;
 
-            let path = std::env::temp_dir().join("reactors.dot");
+            let path = std::env::temp_dir().join("reactors.dot");
 
             File::create(path.clone())
-                .and_then(|mut dot_file| writeln!(dot_file, "{}", graph.format_dot(&id_registry)))
-                .expect("Error while writing DOT file");
-            eprintln!("Wrote dot file to {}", path.to_string_lossy());
+                .and_then(|mut dot_file| writeln!(dot_file, "{}", graph.format_dot(&id_registry)))
+                .expect("Error while writing DOT file");
+            eprintln!("Wrote dot file to {}", path.to_string_lossy());
         }
 
         // collect dependency information
         let dataflow_info = DataflowInfo::new(graph).map_err(|e| e.lift(&id_registry)).unwrap();
 
         // Using thread::scope here introduces an unnamed lifetime for
-        // the scope, which is captured as 't by the SyncScheduler.
+        // the scope, which is captured as 't by the SyncScheduler.
         // This is useful because it captures the constraint that the
-        // dataflow_info outlives 't, so that physical contexts
+        // dataflow_info outlives 't, so that physical contexts
         // can be spawned in threads that capture references
-        // to 'x.
+        // to 'x.
         let initial_time = Instant::now();
-        #[cfg(feature = "parallel-runtime")]
+        #[cfg(feature = "parallel-runtime")]
         let rayon_thread_pool = rayon::ThreadPoolBuilder::new().num_threads(options.threads).build().unwrap();
 
         let scheduler = SyncScheduler::new(options, id_registry, &dataflow_info, reactors, initial_time);
 
         cfg_if::cfg_if! {
-            if #[cfg(feature = "parallel-runtime")] {
+            if #[cfg(feature = "parallel-runtime")] {
                 /// The unsafe impl is safe if scheduler instances
                 /// are only sent between threads like this (their Rc
                 /// internals are not copied).
                 /// So long as the framework entirely controls the lifetime
                 /// of SyncScheduler instances, this is enforceable.
-                unsafe impl Send for SyncScheduler<'_> {}
+                unsafe impl Send for SyncScheduler<'_> {}
 
                 // install makes calls to parallel iterators use that thread pool
                 rayon_thread_pool.install(|| scheduler.launch_event_loop());
@@ -696,7 +697,7 @@
         self.startup();
 
         loop {
-            // flush pending events, this doesn't block
+            // flush pending events, this doesn't block
             for evt in self.rx.try_iter() {
                 let evt = evt.make_executable(self.dataflow);
                 push_event!(self, evt);
@@ -704,10 +705,10 @@
 
             if let Some(evt) = self.event_queue.take_earliest() {
                 if self.is_after_shutdown(evt.tag) {
-                    trace!("Event is late, shutting down - event tag: {}", evt.tag);
+                    trace!("Event is late, shutting down - event tag: {}", evt.tag);
                     break;
                 }
-                trace!("Processing event {}", self.debug().display_event(&evt));
+                trace!("Processing event {}", self.debug().display_event(&evt));
                 match self.catch_up_physical_time(evt.tag.to_logical_time(self.initial_time)) {
                     Ok(_) => {}
                     Err(async_event) => {
@@ -724,7 +725,7 @@
                         }
                     }
                 };
-                // at this point we're at the correct time
+                // at this point we're at the correct time
 
                 if evt.terminate || self.shutdown_time == Some(evt.tag) {
                     return self.shutdown(evt.tag, evt.reactions);
@@ -738,7 +739,7 @@
                 continue;
             } else {
                 // all senders have hung up, or timeout
-                info!("Event queue is empty forever, shutting down.");
+                info!("Event queue is empty forever, shutting down.");
                 break;
             }
         } // end loop
@@ -749,22 +750,22 @@
         // self destructor is called here
     }
 
-    /// Creates a new scheduler. An empty scheduler doesn't
+    /// Creates a new scheduler. An empty scheduler doesn't
     /// do anything unless some events are pushed to the queue.
     /// See [Self::launch_event_loop].
     fn new(
         options: SchedulerOptions,
         id_registry: DebugInfoRegistry,
-        dependency_info: &'x DataflowInfo,
-        reactors: ReactorVec<'x>,
+        dependency_info: &'x DataflowInfo,
+        reactors: ReactorVec<'x>,
         initial_time: Instant,
     ) -> Self {
-        if !cfg!(feature = "parallel-runtime") && options.threads != 0 {
-            warn!("'workers' runtime parameter has no effect unless feature 'parallel-runtime' is enabled")
+        if !cfg!(feature = "parallel-runtime") && options.threads != 0 {
+            warn!("'workers' runtime parameter has no effect unless feature 'parallel-runtime' is enabled")
         }
 
         if options.keep_alive {
-            warn!("'keepalive' runtime parameter has no effect in the Rust target")
+            warn!("'keepalive' runtime parameter has no effect in the Rust target")
         }
 
         let (_, rx) = unbounded::<PhysicalEvent>();
@@ -778,7 +779,7 @@
             latest_processed_tag: None,
             shutdown_time: options.timeout.map(|timeout| {
                 let shutdown_tag = EventTag::ORIGIN.successor(timeout);
-                trace!("Timeout specified, will shut down at most at tag {}", shutdown_tag);
+                trace!("Timeout specified, will shut down at most at tag {}", shutdown_tag);
                 shutdown_tag
             }),
             dataflow: dependency_info,
@@ -791,30 +792,30 @@
     /// physical time, and runs the startup reactions
     /// of all reactors.
     fn startup(&mut self) {
-        info!("Triggering startup...");
-        debug_assert!(!self.reactors.is_empty(), "No registered reactors");
+        info!("Triggering startup...");
+        debug_assert!(!self.reactors.is_empty(), "No registered reactors");
 
         let startup_reactions = self.dataflow.reactions_triggered_by(&TriggerId::STARTUP);
         self.process_tag(false, EventTag::ORIGIN, Some(Cow::Borrowed(startup_reactions)))
     }
 
-    fn shutdown(&mut self, shutdown_tag: EventTag, reactions: ReactionPlan<'x>) {
-        info!("Scheduler is shutting down, at {}", shutdown_tag);
+    fn shutdown(&mut self, shutdown_tag: EventTag, reactions: ReactionPlan<'x>) {
+        info!("Scheduler is shutting down, at {}", shutdown_tag);
         self.shutdown_time = Some(shutdown_tag);
-        let default_plan: ReactionPlan<'x> = Some(Cow::Borrowed(self.dataflow.reactions_triggered_by(&TriggerId::SHUTDOWN)));
+        let default_plan: ReactionPlan<'x> = Some(Cow::Borrowed(self.dataflow.reactions_triggered_by(&TriggerId::SHUTDOWN)));
         let reactions = ExecutableReactions::merge_cows(reactions, default_plan);
 
         self.process_tag(true, shutdown_tag, reactions);
 
         // notify concurrent threads.
         self.was_terminated.store(true, Ordering::SeqCst);
-        info!("Scheduler has been shut down")
+        info!("Scheduler has been shut down")
     }
 
     /// Returns whether the given event should be ignored and
     /// the event loop be terminated. This would be the case
     /// if the tag of the event is later than the projected
-    /// shutdown time. Such 'late' events may be emitted by
+    /// shutdown time. Such 'late' events may be emitted by
     /// the shutdown wave.
     fn is_after_shutdown(&self, t: EventTag) -> bool {
         self.shutdown_time.map(|shutdown_t| shutdown_t < t).unwrap_or(false)
@@ -826,14 +827,14 @@
         if let Some(shutdown_t) = self.shutdown_time {
             let absolute = shutdown_t.to_logical_time(self.initial_time);
             if let Some(timeout) = absolute.checked_duration_since(Instant::now()) {
-                trace!("Will wait for asynchronous event {} ns", timeout.as_nanos());
+                trace!("Will wait for asynchronous event {} ns", timeout.as_nanos());
                 self.rx.recv_timeout(timeout).ok()
             } else {
-                trace!("Cannot wait, already past programmed shutdown time...");
+                trace!("Cannot wait, already past programmed shutdown time...");
                 None
             }
         } else {
-            trace!("Will wait for asynchronous event without timeout");
+            trace!("Will wait for asynchronous event without timeout");
             self.rx.recv().ok()
         }
     }
@@ -845,21 +846,21 @@
 
         if now < target {
             let t = target - now;
-            trace!("  - Need to sleep {} ns", t.as_nanos());
+            trace!("  - Need to sleep {} ns", t.as_nanos());
             // we use recv_timeout as a thread::sleep so that
             // our sleep is interrupted properly when an async
             // event arrives
             match self.rx.recv_timeout(t) {
                 Ok(async_evt) => {
                     trace!(
-                        "  - Sleep interrupted by async event for tag {}, going back to queue",
+                        "  - Sleep interrupted by async event for tag {}, going back to queue",
                         async_evt.tag
                     );
                     return Err(async_evt);
                 }
                 Err(RecvTimeoutError::Timeout) => { /*great*/ }
                 Err(RecvTimeoutError::Disconnected) => {
-                    // ok, there are no physical actions in the program so it's useless to block on self.rx
+                    // ok, there are no physical actions in the program so it's useless to block on self.rx
                     // we still need to wait though..
                     if let Some(remaining) = target.checked_duration_since(Instant::now()) {
                         std::thread::sleep(remaining);
@@ -871,7 +872,7 @@
         if now > target {
             let delay = now - target;
             trace!(
-                "  - Running late by {} ns = {} µs = {} ms",
+                "  - Running late by {} ns = {} µs = {} ms",
                 delay.as_nanos(),
                 delay.as_micros(),
                 delay.as_millis()
@@ -882,15 +883,15 @@
 
     /// Create a new reaction wave to process the given
     /// reactions at some point in time.
-    fn new_reaction_ctx<'a>(
+    fn new_reaction_ctx<'a>(
         &self,
         tag: EventTag,
-        todo: ReactionPlan<'x>,
-        rx: &'a Receiver<PhysicalEvent>,
-        debug_info: DebugInfoProvider<'a>,
-        was_terminated_atomic: &'a Arc<AtomicBool>,
+        todo: ReactionPlan<'x>,
+        rx: &'a Receiver<PhysicalEvent>,
+        debug_info: DebugInfoProvider<'a>,
+        was_terminated_atomic: &'a Arc<AtomicBool>,
         was_terminated: bool,
-    ) -> ReactionCtx<'a, 'x> {
+    ) -> ReactionCtx<'a, 'x> {
         ReactionCtx::new(
             rx,
             tag,
@@ -909,11 +910,11 @@
     }
 
     /// Actually process a tag. The provided reactions are the
-    /// root reactions that startup the "wave".
-    fn process_tag(&mut self, is_shutdown: bool, tag: EventTag, mut reactions: ReactionPlan<'x>) {
+    /// root reactions that startup the "wave".
+    fn process_tag(&mut self, is_shutdown: bool, tag: EventTag, mut reactions: ReactionPlan<'x>) {
         if cfg!(debug_assertions) {
             if let Some(latest) = self.latest_processed_tag {
-                debug_assert!(tag > latest, "Tag ordering mismatch")
+                debug_assert!(tag > latest, "Tag ordering mismatch")
             }
         }
         self.latest_processed_tag = Some(tag);
@@ -927,7 +928,7 @@
 
         while let Some((level_no, batch)) = next_level {
             let level_no = level_no.cloned();
-            trace!("  - Level {}", level_no);
+            trace!("  - Level {}", level_no);
             ctx.cur_level = level_no.key;
 
             /// Minimum number of reactions (inclusive) required
@@ -935,8 +936,8 @@
             /// TODO experiment with tweaking this
             const PARALLEL_THRESHOLD: usize = 3;
 
-            if cfg!(feature = "parallel-runtime") && batch.len() >= PARALLEL_THRESHOLD {
-                #[cfg(feature = "parallel-runtime")]
+            if cfg!(feature = "parallel-runtime") && batch.len() >= PARALLEL_THRESHOLD {
+                #[cfg(feature = "parallel-runtime")]
                 parallel_rt_impl::process_batch(&mut ctx, &mut self.reactors, batch);
             } else {
                 // the impl for non-parallel runtime
@@ -964,14 +965,14 @@
     }
 }
 
-#[cfg(feature = "parallel-runtime")]
+#[cfg(feature = "parallel-runtime")]
 mod parallel_rt_impl {
     use rayon::prelude::*;
 
     use super::*;
     use crate::scheduler::dependencies::Level;
 
-    pub(super) fn process_batch(ctx: &mut ReactionCtx<'_, '_>, reactors: &mut ReactorVec<'_>, batch: &Level) {
+    pub(super) fn process_batch(ctx: &mut ReactionCtx<'_, '_>, reactors: &mut ReactorVec<'_>, batch: &Level) {
         let reactors_mut = UnsafeSharedPointer(reactors.raw.as_mut_ptr());
 
         ctx.insides.absorb(
@@ -1006,13 +1007,12 @@
 
     /// We need a Clone bound to use fold_with, but this clone
     /// implementation is not general purpose so I hide it.
-    struct CloneableCtx<'a, 'x>(ReactionCtx<'a, 'x>);
+    struct CloneableCtx<'a, 'x>(ReactionCtx<'a, 'x>);
 
-    impl Clone for CloneableCtx<'_, '_> {
+    impl Clone for CloneableCtx<'_, '_> {
         fn clone(&self) -> Self {
             Self(self.0.fork())
         }
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/time.rs.html b/src/reactor_rt/time.rs.html index a8eb42aa..bc123bf5 100644 --- a/src/reactor_rt/time.rs.html +++ b/src/reactor_rt/time.rs.html @@ -1,4 +1,5 @@ -time.rs - source
1
+time.rs - source
+    
1
 2
 3
 4
@@ -52,7 +53,7 @@
 52
 53
 54
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -65,7 +66,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -94,7 +95,7 @@
 }
 
 impl Display for MicroStep {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
         Display::fmt(&self.0, f)
     }
 }
@@ -106,5 +107,4 @@
         Self(self.0 + rhs)
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/timers.rs.html b/src/reactor_rt/timers.rs.html index a29ae7a0..5e517dd6 100644 --- a/src/reactor_rt/timers.rs.html +++ b/src/reactor_rt/timers.rs.html @@ -1,4 +1,5 @@ -timers.rs - source
1
+timers.rs - source
+    
1
 2
 3
 4
@@ -94,7 +95,7 @@
 94
 95
 96
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -107,7 +108,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -190,5 +191,4 @@
         }
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/triggers.rs.html b/src/reactor_rt/triggers.rs.html index aea6311c..83fd9deb 100644 --- a/src/reactor_rt/triggers.rs.html +++ b/src/reactor_rt/triggers.rs.html @@ -1,4 +1,5 @@ -triggers.rs - source
1
+triggers.rs - source
+    
1
 2
 3
 4
@@ -160,7 +161,7 @@
 160
 161
 162
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -173,7 +174,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -218,7 +219,7 @@
     fn use_value_ref<O>(&self, now: &EventTag, start: &Instant, action: impl FnOnce(Option<&T>) -> O) -> O;
 }
 
-#[cfg(not(feature = "no-unsafe"))]
+#[cfg(not(feature = "no-unsafe"))]
 pub trait ReactionTriggerWithRefAccess<T> {
     /// Returns a reference to the value, if it is present. Whether a *value*
     /// is present is not in general the same thing as whether *this trigger*
@@ -260,7 +261,7 @@
 
     #[allow(unused)]
     pub(crate) fn new(id: TriggerIdImpl) -> Self {
-        assert!(id > 1, "0-1 are reserved for startup & shutdown!");
+        assert!(id > 1, "0-1 are reserved for startup & shutdown!");
         TriggerId(id)
     }
 
@@ -314,13 +315,12 @@
 }
 
 impl Debug for TriggerId {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
         match *self {
-            TriggerId::STARTUP => write!(f, "startup"),
-            TriggerId::SHUTDOWN => write!(f, "shutdown"),
-            TriggerId(id) => write!(f, "{}", id),
+            TriggerId::STARTUP => write!(f, "startup"),
+            TriggerId::SHUTDOWN => write!(f, "shutdown"),
+            TriggerId(id) => write!(f, "{}", id),
         }
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/reactor_rt/util/mod.rs.html b/src/reactor_rt/util/mod.rs.html index 6ae33fb4..9c76520b 100644 --- a/src/reactor_rt/util/mod.rs.html +++ b/src/reactor_rt/util/mod.rs.html @@ -1,4 +1,5 @@ -mod.rs - source
1
+mod.rs - source
+    
1
 2
 3
 4
@@ -282,7 +283,9 @@
 282
 283
 284
-
/*
+285
+286
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -295,7 +298,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -309,17 +312,19 @@
 use std::convert::TryFrom;
 use std::time::Duration;
 
+pub(crate) mod vecmap;
+
 #[macro_export]
 #[doc(hidden)]
 macro_rules! join_to {
     ($f:expr, $iter:expr) => {
-        join_to!($f, $iter, ", ")
+        join_to!($f, $iter, ", ")
     };
     ($f:expr, $iter:expr, $sep:literal) => {
-        join_to!($f, $iter, $sep, "", "")
+        join_to!($f, $iter, $sep, "", "")
     };
     ($f:expr, $iter:expr, $sep:literal, $prefix:literal, $suffix:literal) => {
-        join_to!($f, $iter, $sep, $prefix, $suffix, |x| format!("{}", x))
+        join_to!($f, $iter, $sep, $prefix, $suffix, |x| format!("{}", x))
     };
     ($f:expr, $iter:expr, $sep:literal, $prefix:literal, $suffix:literal, $display:expr) => {{
         $crate::util::do_write($f, $iter, $sep, $prefix, $suffix, $display)
@@ -329,21 +334,21 @@
 pub(crate) fn do_write<X>(
     f: &mut impl std::fmt::Write,
     iter: impl Iterator<Item = X>,
-    sep: &'static str,
-    prefix: &'static str,
-    suffix: &'static str,
+    sep: &'static str,
+    prefix: &'static str,
+    suffix: &'static str,
     formatter: impl Fn(X) -> String,
 ) -> std::fmt::Result {
     let mut iter = iter;
-    write!(f, "{}", prefix)?;
+    write!(f, "{}", prefix)?;
     if let Some(first) = iter.next() {
-        write!(f, "{}", formatter(first))?;
+        write!(f, "{}", formatter(first))?;
     }
     for item in iter {
-        write!(f, "{}", sep)?;
-        write!(f, "{}", formatter(item))?;
+        write!(f, "{}", sep)?;
+        write!(f, "{}", formatter(item))?;
     }
-    write!(f, "{}", suffix)
+    write!(f, "{}", suffix)
 }
 
 /// Shorthand for using [After](crate::Offset::After) together with [delay].
@@ -412,7 +417,7 @@
     ($amount:tt days)     => { delay!($amount d) };
     ($amount:tt week)     => { delay!((7*$amount) d) };
     ($amount:tt weeks)    => { delay!($amount week) };
-    ($amount:tt $i:ident) => { compile_error!(concat!("Unknown time unit `", stringify!($i), "`")) };
+    ($amount:tt $i:ident) => { compile_error!(concat!("Unknown time unit `", stringify!($i), "`")) };
 }
 
 /// Convenient macro to assert equality of the current tag.
@@ -488,13 +493,13 @@
     /// This recognizes the same strings as LF
     fn try_from(value: &str) -> Result<Self, Self::Error> {
         let u = match value {
-            "day" | "days" => Self::DAY,
-            "h" | "hour" | "hours" => Self::HOUR,
-            "min" | "minute" | "minutes" => Self::MIN,
-            "s" | "sec" | "secs" => Self::SEC,
-            "ms" | "msec" | "msecs" => Self::MILLI,
-            "us" | "usec" | "usecs" => Self::MICRO,
-            "ns" | "nsec" | "nsecs" => Self::NANO,
+            "day" | "days" => Self::DAY,
+            "h" | "hour" | "hours" => Self::HOUR,
+            "min" | "minute" | "minutes" => Self::MIN,
+            "s" | "sec" | "secs" => Self::SEC,
+            "ms" | "msec" | "msecs" => Self::MILLI,
+            "us" | "usec" | "usecs" => Self::MICRO,
+            "ns" | "nsec" | "nsecs" => Self::NANO,
             _ => return Err(()),
         };
         Ok(u)
@@ -526,18 +531,18 @@
 /// use reactor_rt::try_parse_duration;
 /// use std::time::Duration;
 ///
-/// assert_eq!(try_parse_duration("3 ms"),   Ok(Duration::from_millis(3)));
-/// assert_eq!(try_parse_duration("3ms"),    Ok(Duration::from_millis(3)));
-/// assert_eq!(try_parse_duration("5us"),    Ok(Duration::from_micros(5)));
-/// assert_eq!(try_parse_duration("30ns"),   Ok(Duration::from_nanos(30)));
-/// assert_eq!(try_parse_duration("30nsec"), Ok(Duration::from_nanos(30)));
-/// assert_eq!(try_parse_duration("30secs"), Ok(Duration::from_secs(30)));
+/// assert_eq!(try_parse_duration("3 ms"),   Ok(Duration::from_millis(3)));
+/// assert_eq!(try_parse_duration("3ms"),    Ok(Duration::from_millis(3)));
+/// assert_eq!(try_parse_duration("5us"),    Ok(Duration::from_micros(5)));
+/// assert_eq!(try_parse_duration("30ns"),   Ok(Duration::from_nanos(30)));
+/// assert_eq!(try_parse_duration("30nsec"), Ok(Duration::from_nanos(30)));
+/// assert_eq!(try_parse_duration("30secs"), Ok(Duration::from_secs(30)));
 /// // unit is not required for zero
-/// assert_eq!(try_parse_duration("0"), Ok(Duration::from_secs(0)));
+/// assert_eq!(try_parse_duration("0"), Ok(Duration::from_secs(0)));
 ///
-/// assert_eq!(try_parse_duration(""), Err("cannot parse empty string".into()));
-/// assert_eq!(try_parse_duration("30"), Err("time unit required".into()));
-/// assert_eq!(try_parse_duration("30000000000000000000000ns"), Err("number too large to fit in target type".into()));
+/// assert_eq!(try_parse_duration(""), Err("cannot parse empty string".into()));
+/// assert_eq!(try_parse_duration("30"), Err("time unit required".into()));
+/// assert_eq!(try_parse_duration("30000000000000000000000ns"), Err("number too large to fit in target type".into()));
 ///
 /// ```
 ///
@@ -546,25 +551,24 @@
     let mut chars = t.char_indices().skip_while(|(_, c)| c.is_numeric());
 
     if let Some((num_end, _)) = &chars.next() {
-        let magnitude: u64 = t[0..*num_end].parse::<u64>().map_err(|e| format!("{}", e))?;
+        let magnitude: u64 = t[0..*num_end].parse::<u64>().map_err(|e| format!("{}", e))?;
 
         let unit = t[*num_end..].trim();
 
         let duration = match TimeUnit::try_from(unit) {
             Ok(unit) => unit.to_duration(magnitude),
-            Err(_) => return Err(format!("unknown time unit '{}'", unit)),
+            Err(_) => return Err(format!("unknown time unit '{}'", unit)),
         };
         Ok(duration)
-    } else if t != "0" {
+    } else if t != "0" {
         // no unit
         if !t.is_empty() {
-            Err("time unit required".into())
+            Err("time unit required".into())
         } else {
-            Err("cannot parse empty string".into())
+            Err("cannot parse empty string".into())
         }
     } else {
         Ok(Duration::from_secs(0))
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/src/vecmap/lib.rs.html b/src/reactor_rt/util/vecmap.rs.html similarity index 86% rename from src/vecmap/lib.rs.html rename to src/reactor_rt/util/vecmap.rs.html index 7400c9b1..f5c7c0b3 100644 --- a/src/vecmap/lib.rs.html +++ b/src/reactor_rt/util/vecmap.rs.html @@ -1,4 +1,5 @@ -lib.rs - source
1
+vecmap.rs - source
+    
1
 2
 3
 4
@@ -335,7 +336,7 @@
 335
 336
 337
-
/*
+
/*
  * Copyright (c) 2021, TU Dresden.
  *
  * Redistribution and use in source and binary forms, with or without modification,
@@ -348,7 +349,7 @@
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@@ -476,7 +477,7 @@
         let from = if self.is_valid_keyref(&key) {
             key.min_idx
         } else {
-            0 // it's not, maybe it was produced by another vecmap
+            0 // it's not, maybe it was produced by another vecmap
         };
 
         for idx in from..self.v.len() {
@@ -496,7 +497,7 @@
     }
 
     /// Iterate over all key-value paris in the map.
-    pub fn iter(&self) -> impl Iterator<Item = &(K, V)> + '_ {
+    pub fn iter(&self) -> impl Iterator<Item = &(K, V)> + '_ {
         self.v.iter()
     }
 
@@ -556,7 +557,7 @@
 }
 
 impl<K: Ord + Eq + Debug, V: Debug> Debug for VecMap<K, V> {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
         self.v.iter().collect::<Vec<&(K, V)>>().fmt(f)
     }
 }
@@ -568,38 +569,38 @@
 }
 
 /// A view into a single entry in a map, which may either be vacant or occupied.
-pub enum Entry<'a, K, V>
+pub enum Entry<'a, K, V>
 where
     K: Ord + Eq,
 {
     /// A vacant Entry
-    Vacant(VacantEntry<'a, K, V>),
+    Vacant(VacantEntry<'a, K, V>),
 
     /// An occupied Entry
-    Occupied(OccupiedEntry<'a, K, V>),
+    Occupied(OccupiedEntry<'a, K, V>),
 }
 
 /// A vacant Entry.
-pub struct VacantEntry<'a, K, V>
+pub struct VacantEntry<'a, K, V>
 where
     K: Ord + Eq,
 {
-    map: &'a mut VecMap<K, V>,
+    map: &'a mut VecMap<K, V>,
     key: K,
     index: usize,
 }
 
 /// An occupied Entry.
-pub struct OccupiedEntry<'a, K, V>
+pub struct OccupiedEntry<'a, K, V>
 where
     K: Ord + Eq,
 {
-    map: &'a mut VecMap<K, V>,
+    map: &'a mut VecMap<K, V>,
     key: K,
     index: usize,
 }
 
-impl<K, V> Entry<'_, K, V>
+impl<K, V> Entry<'_, K, V>
 where
     K: Ord + Eq,
 {
@@ -611,26 +612,26 @@
     }
 }
 
-impl<K, V> VacantEntry<'_, K, V>
+impl<K, V> VacantEntry<'_, K, V>
 where
     K: Ord + Eq,
 {
-    /// Sets the value of the entry with the VacantEntry's key.
+    /// Sets the value of the entry with the VacantEntry's key.
     pub fn insert(self, value: V) {
         self.map.insert_internal(self.index, self.key, value)
     }
 }
 
-impl<K, V> OccupiedEntry<'_, K, V>
+impl<K, V> OccupiedEntry<'_, K, V>
 where
     K: Ord + Eq,
 {
-    /// Replaces the entry's value with `value`.
+    /// Replaces the entry's value with `value`.
     pub fn replace(&mut self, value: V) {
         self.map.v[self.index].1 = value;
     }
 
-    /// Gets the mutable ref to the entry's value.
+    /// Gets the mutable ref to the entry's value.
     pub fn get_mut(&mut self) -> &mut V {
         &mut self.map.v[self.index].1
     }
@@ -643,7 +644,7 @@
 pub struct KeyRef<K> {
     pub key: K,
     /// This is a lower bound on the actual index of key K,
-    /// it doesn't need to be the index (though it usually will be).
+    /// it doesn't need to be the index (though it usually will be).
     min_idx: usize,
 }
 
@@ -662,8 +663,8 @@
 }
 
 impl<K: Display> Display for KeyRef<K> {
-    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
-        write!(f, "{}", self.key)
+    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{}", self.key)
     }
 }
 
@@ -672,5 +673,4 @@
         Self { key, min_idx: 0 }
     }
 }
-
-
\ No newline at end of file +
\ No newline at end of file diff --git a/static.files/COPYRIGHT-002d5dd09d9a4f50.txt b/static.files/COPYRIGHT-23e9bde6c69aea69.txt similarity index 97% rename from static.files/COPYRIGHT-002d5dd09d9a4f50.txt rename to static.files/COPYRIGHT-23e9bde6c69aea69.txt index 34e48134..1447df79 100644 --- a/static.files/COPYRIGHT-002d5dd09d9a4f50.txt +++ b/static.files/COPYRIGHT-23e9bde6c69aea69.txt @@ -1,3 +1,5 @@ +# REUSE-IgnoreStart + These documentation pages include resources by third parties. This copyright file applies only to those resources. The following third party resources are included, and carry their own copyright notices and license terms: @@ -44,3 +46,5 @@ included, and carry their own copyright notices and license terms: See SourceSerif4-LICENSE.md. This copyright file is intended to be distributed with rustdoc output. + +# REUSE-IgnoreEnd diff --git a/static.files/FiraSans-LICENSE-1761dca11ffc8f19.txt b/static.files/FiraSans-LICENSE-db4b642586e02d97.txt similarity index 99% rename from static.files/FiraSans-LICENSE-1761dca11ffc8f19.txt rename to static.files/FiraSans-LICENSE-db4b642586e02d97.txt index ff9afab0..d7e9c149 100644 --- a/static.files/FiraSans-LICENSE-1761dca11ffc8f19.txt +++ b/static.files/FiraSans-LICENSE-db4b642586e02d97.txt @@ -1,3 +1,5 @@ +// REUSE-IgnoreStart + Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. with Reserved Font Name < Fira >, @@ -92,3 +94,5 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/NanumBarunGothic-LICENSE-2fe9ce67ec95245d.txt b/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt similarity index 99% rename from static.files/NanumBarunGothic-LICENSE-2fe9ce67ec95245d.txt rename to static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt index 0bf46682..4b3edc29 100644 --- a/static.files/NanumBarunGothic-LICENSE-2fe9ce67ec95245d.txt +++ b/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt @@ -1,3 +1,5 @@ +// REUSE-IgnoreStart + Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, @@ -97,3 +99,5 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-LICENSE-f554967dca0cf1dd.txt b/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt similarity index 99% rename from static.files/SourceCodePro-LICENSE-f554967dca0cf1dd.txt rename to static.files/SourceCodePro-LICENSE-d180d465a756484a.txt index 07542572..0d2941e1 100644 --- a/static.files/SourceCodePro-LICENSE-f554967dca0cf1dd.txt +++ b/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt @@ -1,3 +1,5 @@ +// REUSE-IgnoreStart + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. This Font Software is licensed under the SIL Open Font License, Version 1.1. @@ -91,3 +93,5 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceSerif4-LICENSE-971e190366a5901b.md b/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md similarity index 95% rename from static.files/SourceSerif4-LICENSE-971e190366a5901b.md rename to static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md index 5871e1f3..175fa4f4 100644 --- a/static.files/SourceSerif4-LICENSE-971e190366a5901b.md +++ b/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md @@ -1,3 +1,6 @@ + + +Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. This Font Software is licensed under the SIL Open Font License, Version 1.1. @@ -91,3 +94,5 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + + diff --git a/static.files/ayu-be46fdc453a55015.css b/static.files/ayu-be46fdc453a55015.css deleted file mode 100644 index 1cad9034..00000000 --- a/static.files/ayu-be46fdc453a55015.css +++ /dev/null @@ -1 +0,0 @@ - :root{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--source-sidebar-background-selected:#14191f;--source-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:rgb(91,59,1);--scrape-example-code-line-highlight-focus:rgb(124,75,15);--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);}h1,h2,h3,h4,h1 a,.sidebar h2 a,.sidebar h3 a,#source-sidebar>.title{color:#fff;}h4{border:none;}.docblock code{color:#ffb454;}.docblock a>code{color:#39AFD7 !important;}.code-header,.docblock pre>code,pre,pre>code,.item-info code,.rustdoc.source .example-wrap{color:#e6e1cf;}.sidebar .current,.sidebar a:hover,#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus,#source-sidebar div.files>a.selected{color:#ffb44c;}.sidebar-elems .location{color:#ff7733;}.src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}.search-results a:hover,.search-results a:focus{color:#fff !important;background-color:#3c3c3c;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}#search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}#search-tabs>button:not(.selected){border:none;background-color:transparent !important;}#search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#settings-menu>a img{filter:invert(100);} \ No newline at end of file diff --git a/static.files/dark-cf923f49f397b216.css b/static.files/dark-cf923f49f397b216.css deleted file mode 100644 index 70f9f118..00000000 --- a/static.files/dark-cf923f49f397b216.css +++ /dev/null @@ -1 +0,0 @@ -:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--source-sidebar-background-selected:#333;--source-sidebar-background-hover:#444;--table-alt-row-background-color:#2A2A2A;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:rgb(91,59,1);--scrape-example-code-line-highlight-focus:rgb(124,75,15);--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);} \ No newline at end of file diff --git a/static.files/light-db279b6232be9c13.css b/static.files/light-db279b6232be9c13.css deleted file mode 100644 index f0080dbe..00000000 --- a/static.files/light-db279b6232be9c13.css +++ /dev/null @@ -1 +0,0 @@ -:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#F5F5F5;--sidebar-background-color-hover:#E0E0E0;--code-block-background-color:#F5F5F5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#ffffff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--source-sidebar-background-selected:#fff;--source-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#F5F5F5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);} \ No newline at end of file diff --git a/static.files/main-305769736d49e732.js b/static.files/main-305769736d49e732.js new file mode 100644 index 00000000..b8b91afa --- /dev/null +++ b/static.files/main-305769736d49e732.js @@ -0,0 +1,11 @@ +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerText=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}})}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","));for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px")}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-sidebar.offsetLeft-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px")},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static.files/main-98a684e84ae5b08b.js b/static.files/main-98a684e84ae5b08b.js deleted file mode 100644 index 1a1db3b0..00000000 --- a/static.files/main-98a684e84ae5b08b.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict";function getVar(name){const el=document.getElementById("rustdoc-vars");if(el){return el.attributes["data-"+name].value}else{return null}}function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function elemIsInParent(elem,parent){while(elem&&elem!==document.body){if(elem===parent){return true}elem=elem.parentElement}return false}function blurHandler(event,parentElem,hideCallback){if(!elemIsInParent(document.activeElement,parentElem)&&!elemIsInParent(event.relatedTarget,parentElem)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileLocationTitle=document.querySelector(".mobile-topbar h2");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileLocationTitle&&locationTitle){mobileLocationTitle.innerHTML=locationTitle.innerHTML}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function loadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="stylesheet";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadCss(getVar("static-root-path")+getVar("settings-css"));loadScript(getVar("static-root-path")+getVar("settings-js"))};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:()=>{switchDisplayedElement(null);document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},};function getPageId(){if(window.location.hash){const tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();switchDisplayedElement(null);if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}const current_page=document.location.href.split("/").pop();const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("union","unions","Unions");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Definitions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=script?script.getAttribute("data-ignore-extern-crates"):"";for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.indexOf(lib)!==-1){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";if(window.rootPath!=="./"&&crate===window.currentCrate){link.className="current"}link.textContent=crate;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}});const pageId=getPageId();if(pageId!==null){expandSection(pageId)}}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}let oldSidebarScrollPosition=null;window.rustdocMobileScrollLock=function(){const mobile_topbar=document.querySelector(".mobile-topbar");if(window.innerWidth<=window.RUSTDOC_MOBILE_BREAKPOINT){oldSidebarScrollPosition=window.scrollY;document.body.style.width=`${document.body.offsetWidth}px`;document.body.style.position="fixed";document.body.style.top=`-${oldSidebarScrollPosition}px`;if(mobile_topbar){mobile_topbar.style.top=`${oldSidebarScrollPosition}px`;mobile_topbar.style.position="relative"}}else{oldSidebarScrollPosition=null}};window.rustdocMobileScrollUnlock=function(){const mobile_topbar=document.querySelector(".mobile-topbar");if(oldSidebarScrollPosition!==null){document.body.style.width="";document.body.style.position="";document.body.style.top="";if(mobile_topbar){mobile_topbar.style.top="";mobile_topbar.style.position=""}window.scrollTo(0,oldSidebarScrollPosition);oldSidebarScrollPosition=null}};function showSidebar(){window.hideAllModals(false);window.rustdocMobileScrollLock();const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){window.rustdocMobileScrollUnlock();const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.innerWidth>window.RUSTDOC_MOBILE_BREAKPOINT&&oldSidebarScrollPosition!==null){hideSidebar()}if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else if(e.getAttribute("title")!==undefined){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("title")));wrapper.appendChild(titleContent)}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px")}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;wrapper.onpointerleave=function(ev){if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(event.relatedTarget,e)){hideTooltip(true)}}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=function(){this.TOOLTIP_FORCE_VISIBLE=this.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!this.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(this);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=function(ev){if(ev.pointerType!=="mouse"){return}showTooltip(this)};e.onpointerleave=function(ev){if(ev.pointerType!=="mouse"){return}if(!this.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)){hideTooltip(true)}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");book_info.className="top";book_info.innerHTML="You can find more information in \ - the rustdoc book.";const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ - restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ - enum, trait, type, macro, \ - and const.","Search functions by type signature (e.g., vec -> usize or \ - -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ - str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ - your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=function(switchFocus){hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=function(){onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static.files/noscript-13285aec31fa243e.css b/static.files/noscript-13285aec31fa243e.css deleted file mode 100644 index c32e0cb1..00000000 --- a/static.files/noscript-13285aec31fa243e.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}nav.sub{display:none;}.source .sidebar{display:none;}.notable-traits{display:none;} \ No newline at end of file diff --git a/static.files/noscript-feafe1bb7466e4bd.css b/static.files/noscript-feafe1bb7466e4bd.css new file mode 100644 index 00000000..7bbe07f1 --- /dev/null +++ b/static.files/noscript-feafe1bb7466e4bd.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ No newline at end of file diff --git a/static.files/rustdoc-ac92e1bbe349e143.css b/static.files/rustdoc-ac92e1bbe349e143.css new file mode 100644 index 00000000..27e3d9d5 --- /dev/null +++ b/static.files/rustdoc-ac92e1bbe349e143.css @@ -0,0 +1,18 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.sub-logo-container,.logo-container{line-height:0;display:block;}.sub-logo-container{margin-right:32px;}.sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .rustdoc.src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}#src-sidebar-toggle>button:hover,#src-sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.src .sidebar>*:not(#src-sidebar-toggle){visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*:not(#src-sidebar-toggle){visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;margin-right:0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.5rem;padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.5rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;margin-top:calc((-16px + 0.57rem ) / 2 );}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar-toggle{position:sticky;top:0;left:0;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:stretch;align-items:stretch;z-index:10;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid var(--border-color);margin-bottom:6px;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}#src-sidebar-toggle>button{font-size:inherit;font-weight:bold;background:none;color:inherit;text-align:center;border:none;outline:none;flex:1 1;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;}.hide-sidebar #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;width:33px;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.hide-sidebar #sidebar-button{position:static;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;color:var(--main-color);}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#src-sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;border:1px solid;border-left:0;}.src-sidebar-expanded #src-sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{max-width:100vw;width:100vw;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}.sub-logo-container>img{height:35px;width:35px;margin-bottom:var(--nav-sub-mobile-padding);}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"]{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a,:root[data-theme="ayu"] #source-sidebar>.title{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/static.files/rustdoc-c4dbdcde0fbd8430.css b/static.files/rustdoc-c4dbdcde0fbd8430.css deleted file mode 100644 index afd98f0e..00000000 --- a/static.files/rustdoc-c4dbdcde0fbd8430.css +++ /dev/null @@ -1,8 +0,0 @@ - @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.srclink,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name .primitive>i,.result-name .keyword>i{color:var(--main-color);}.content span.enum,.content a.enum,.content span.struct,.content a.struct,.content span.union,.content a.union,.content span.primitive,.content a.primitive,.content span.type,.content a.type,.content span.foreigntype,.content a.foreigntype{color:var(--type-link-color);}.content span.trait,.content a.trait,.content span.traitalias,.content a.traitalias{color:var(--trait-link-color);}.content span.associatedtype,.content a.associatedtype,.content span.constant,.content a.constant,.content span.static,.content a.static{color:var(--assoc-item-link-color);}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod{color:var(--function-link-color);}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:var(--macro-link-color);}.content span.mod,.content a.mod{color:var(--mod-link-color);}.content span.keyword,.content a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p{margin:0 0 .75em 0;}p:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.source main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.source .content pre{padding:20px;}.rustdoc.source .example-wrap>pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.sub-logo-container,.logo-container{line-height:0;display:block;}.sub-logo-container{margin-right:32px;}.sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 200px;overflow-y:scroll;position:sticky;height:100vh;top:0;left:0;}.rustdoc.source .sidebar{flex-basis:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar-toggle,#source-sidebar{background-color:var(--sidebar-background-color);}#src-sidebar-toggle>button:hover,#src-sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.source .sidebar>*:not(#src-sidebar-toggle){visibility:hidden;}.source-sidebar-expanded .source .sidebar{overflow-y:auto;flex-basis:300px;}.source-sidebar-expanded .source .sidebar>*:not(#src-sidebar-toggle){visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.sidebar .logo-container{margin-top:10px;margin-bottom:10px;text-align:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap>pre{margin:0;flex-grow:1;overflow:auto hidden;}.rustdoc .example-wrap>pre.example-line-numbers,.rustdoc .example-wrap>pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap>pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.source .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}.method .where,.fn .where,.where.fmt-newline{display:block;white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.source nav.sub{margin:0 0 15px 0;}.small-section-header{display:block;position:relative;}.small-section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.main-heading a:hover,.example-wrap>pre.rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block a.current{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}@-moz-document url-prefix(){#crate-search{padding-left:0px;padding-right:19px;}}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ - ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div{flex:1;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name span.alias{color:var(--search-results-alias-color);}.search-results .result-name span.grey{color:var(--search-results-grey-color);}.popover{position:absolute;top:100%;right:0;z-index:2;margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{min-height:36px;display:flex;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;align-items:center;white-space:pre-wrap;border-radius:3px;display:inline-flex;vertical-align:text-bottom;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji{font-size:1.25rem;margin-right:0.3rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.source .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}#src-sidebar-toggle{position:sticky;top:0;left:0;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:stretch;align-items:stretch;z-index:10;}#source-sidebar{width:100%;overflow:auto;}#source-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid var(--border-color);margin-bottom:6px;}#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--source-sidebar-background-hover);}#source-sidebar div.files>a.selected{background-color:var(--source-sidebar-background-selected);}#src-sidebar-toggle>button{font-size:inherit;font-weight:bold;background:none;color:inherit;text-align:center;border:none;outline:none;flex:1 1;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;display:flex;}#settings-menu>a,#help-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus{border-color:var(--settings-button-border-focus);}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;width:33px;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.source main,.rustdoc.source .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.source-sidebar-expanded .source .sidebar,.rustdoc:not(.source) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;color:var(--main-color);}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#search-tabs .count{display:block;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#src-sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;border:1px solid;border-left:0;}.source-sidebar-expanded #src-sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#copy-path,#help-button{display:none;}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.source-sidebar-expanded .source .sidebar{max-width:100vw;width:100vw;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.source nav.sub{margin:0;padding:8px;}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.srclink,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}.sub-logo-container>img{height:35px;width:35px;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;} \ No newline at end of file diff --git a/static.files/search-2b6ce74ff89ae146.js b/static.files/search-2b6ce74ff89ae146.js new file mode 100644 index 00000000..05459703 --- /dev/null +++ b/static.files/search-2b6ce74ff89ae146.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let functionTypeFingerprint;let currentResults;let typeNameIdMap;const ALIASES=new Map();let typeNameIdOfArray;let typeNameIdOfSlice;let typeNameIdOfArrayOrSlice;function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-]".indexOf(c)!==-1}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return{name:"never",id:null,fullPath:["never"],pathWithoutLast:[],pathLast:"never",normalizedPathLast:"never",generics:[],bindings:new Map(),typeFilter:"primitive",bindingName,}}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){bindings.set(gen.bindingName.name,[gen,...gen.bindingName.generics]);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let start=parserState.pos;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;start=parserState.pos;getNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;let start=parserState.pos;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}throw["Unexpected ",c]}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}else if(query.elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=query.elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;foundStopChar=true;continue}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;start=parserState.pos;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}duplicates.add(obj.fullPath);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){if(results.size===0){return[]}const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=aaa.item.deprecated;b=bbb.item.deprecated;if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb){const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb);if(passesUnification){return true}}return false});if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false});return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens){if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens)}return false}function checkIfInList(list,elem,whereClause,mgens){for(const entry of list){if(checkType(entry,elem,whereClause,mgens)){return true}}return false}function checkType(row,elem,whereClause,mgens){if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens)}}return unifyFunctionTypes([row],[elem],whereClause,mgens)}function checkPath(contains,ty,maxEditDistance){if(contains.length===0){return 0}let ret_dist=maxEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxEditDistance){continue pathiter}dist_total+=dist}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,deprecated:item.deprecated,implDisambiguator:item.implDisambiguator,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row,maxEditDistance);if(path_dist>maxEditDistance){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist+path_dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens)})){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){let queryLen=0;for(const elem of parsedQuery.elems){queryLen+=elem.name.length}for(const elem of parsedQuery.returned){queryLen+=elem.name.length}const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=editDistance(name,elem.normalizedPathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}))}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));showResults(execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.map(type=>buildItemSearchType(type,lowercasePaths))}function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=[];bindings=new Map()}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths);if(type.length>BINDINGS_DATA){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=new Map()}}if(pathIndex<0){return{id:pathIndex,ty:TY_GENERIC,path:null,generics,bindings,}}if(pathIndex===0){return{id:null,ty:null,path:null,generics,bindings,}}const item=lowercasePaths[pathIndex-1];return{id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,generics,bindings,}}function buildFunctionSearchType(functionSearchType,lowercasePaths){const INPUTS_DATA=0;const OUTPUT_DATA=1;if(functionSearchType===0){return null}let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:[],bindings:new Map(),};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}function buildIndex(rawSearchIndex){searchIndex=[];typeNameIdMap=new Map();const charA="A".charCodeAt(0);let currentIndex=0;let id=0;typeNameIdOfArray=buildTypeMapIndex("array");typeNameIdOfSlice=buildTypeMapIndex("slice");typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const crateRow={crate:crate,ty:3,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),deprecated:null,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemDescs=crateCorpus.d;const itemParentIdxs=crateCorpus.i;const itemFunctionSearchTypes=crateCorpus.f;const deprecatedItems=new Set(crateCorpus.c);const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}lowercasePaths.push({ty:ty,name:name.toLowerCase(),path:path});paths[i]={ty:ty,name:name,path:path}}lastPath="";len=itemTypes.length;for(let i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type,id:id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),deprecated:deprecatedItems.has(i),implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length}}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/static.files/search-8a59a8356673ec1f.js b/static.files/search-8a59a8356673ec1f.js deleted file mode 100644 index c8963b3b..00000000 --- a/static.files/search-8a59a8356673ec1f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_KEYWORD=itemTypes.indexOf("keyword");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb}else if(nb!==0){printTab(0)}}const levenshtein_row2=[];function levenshtein(s1,s2){if(s1===s2){return 0}const s1_len=s1.length,s2_len=s2.length;if(s1_len&&s2_len){let i1=0,i2=0,a,b,c,c2;const row=levenshtein_row2;while(i1-".indexOf(c)!==-1}function isStopCharacter(c){return isWhitespace(c)||isEndCharacter(c)}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||isWhitespaceCharacter(c)}function isWhitespaceCharacter(c){return c===" "||c==="\t"}function createQueryElement(query,parserState,name,generics,isInGenerics){if(name==="*"||(name.length===0&&generics.length===0)){return}if(query.literalSearch&&parserState.totalElems-parserState.genericsElems>0){throw["You cannot have more than one element if you use quotes"]}const pathSegments=name.split("::");if(pathSegments.length>1){for(let i=0,len=pathSegments.length;i=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(start>=end&&generics.length===0){return}elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;while(parserState.pos"){extra="<"}else if(endChar===""){extra="->"}else{extra=endChar}throw["Unexpected ",c," after ",extra]}if(!foundStopChar){if(endChar!==""){throw["Expected ",",",", "," "," or ",endChar,", found ",c,]}throw["Expected ",","," or "," ",", found ",c,]}const posBefore=parserState.pos;getNextElem(query,parserState,elems,endChar===">");if(endChar!==""){if(parserState.pos>=parserState.length){throw["Unclosed ","<"]}const c2=parserState.userQuery[parserState.pos];if(!isSeparatorCharacter(c2)&&c2!==endChar){throw["Expected ",endChar,", found ",c2]}}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ","<"]}parserState.pos+=1}function checkExtraTypeFilterCharacters(parserState){const query=parserState.userQuery;for(let pos=0;pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}throw["Unexpected ",c]}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"]}if(query.elems.length===0){throw["Expected type filter before ",":"]}else if(query.elems.length!==1||parserState.totalElems!==1){throw["Unexpected ",":"]}else if(query.literalSearch){throw["You cannot use quotes on type filter"]}checkExtraTypeFilterCharacters(parserState);parserState.typeFilter=query.elems.pop().name;parserState.pos+=1;parserState.totalElems=0;query.literalSearch=false;foundStopChar=true;continue}if(!foundStopChar){if(parserState.typeFilter!==null){throw["Expected ",",",", "," "," or ","->",", found ",c,]}throw["Expected ",",",", "," ",", ",":"," or ","->",", found ",c,]}const before=query.elems.length;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),typeFilter:NO_TYPE_FILTER,elems:[],returned:[],foundElems:0,literalSearch:false,error:null,}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return null}function parseQuery(userQuery){userQuery=userQuery.trim();const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);if(parserState.typeFilter!==null){let typeFilter=parserState.typeFilter;if(typeFilter==="const"){typeFilter="constant"}query.typeFilter=itemTypeFromName(typeFilter)}}catch(err){query=newParsedQuery(userQuery);query.error=err;query.typeFilter=-1;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,searchWords,filterCrates,currentCrate){const results_others={},results_in_args={},results_returned={};function transformResults(results){const duplicates={};const out=[];for(const result of results){if(result.id>-1){const obj=searchIndex[result.id];obj.lev=result.lev;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates[obj.fullPath]){continue}duplicates[obj.fullPath]=true;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const ar=[];for(const entry in results){if(hasOwnPropertyRustdoc(results,entry)){const result=results[entry];result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};ar.push(result)}}results=ar;if(results.length===0){return[]}results.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_lev;b=bbb.path_lev;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.lev);b=(bbb.lev);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});let nameSplit=null;if(parsedQuery.elems.length===1){const hasPath=typeof parsedQuery.elems[0].path==="undefined";nameSplit=hasPath?null:parsedQuery.elems[0].path}for(const result of results){if(result.dontValidate){continue}const name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,nameSplit,parent)){result.id=-1}}return transformResults(results)}function checkGenerics(row,elem,defaultLev,maxLevDistance){if(row.generics.length===0){return elem.generics.length===0?defaultLev:maxLevDistance+1}else if(row.generics.length>0&&row.generics[0].name===null){return checkGenerics(row.generics[0],elem,defaultLev,maxLevDistance)}let elem_name;if(elem.generics.length>0&&row.generics.length>=elem.generics.length){const elems=Object.create(null);for(const entry of row.generics){elem_name=entry.name;if(elem_name===""){if(checkGenerics(entry,elem,maxLevDistance+1,maxLevDistance)!==0){return maxLevDistance+1}continue}if(elems[elem_name]===undefined){elems[elem_name]=0}elems[elem_name]+=1}for(const generic of elem.generics){let match=null;if(elems[generic.name]){match=generic.name}else{for(elem_name in elems){if(!hasOwnPropertyRustdoc(elems,elem_name)){continue}if(elem_name===generic){match=elem_name;break}}}if(match===null){return maxLevDistance+1}elems[match]-=1;if(elems[match]===0){delete elems[match]}}return 0}return maxLevDistance+1}function checkIfInGenerics(row,elem,maxLevDistance){let lev=maxLevDistance+1;for(const entry of row.generics){lev=Math.min(checkType(entry,elem,true,maxLevDistance),lev);if(lev===0){break}}return lev}function checkType(row,elem,literalSearch,maxLevDistance){if(row.name===null){if(row.generics.length>0){return checkIfInGenerics(row,elem,maxLevDistance)}return maxLevDistance+1}let lev=levenshtein(row.name,elem.name);if(literalSearch){if(lev!==0){if(elem.generics.length===0){const checkGeneric=row.generics.length>0;if(checkGeneric&&row.generics.findIndex(tmp_elem=>tmp_elem.name===elem.name)!==-1){return 0}}return maxLevDistance+1}else if(elem.generics.length>0){return checkGenerics(row,elem,maxLevDistance+1,maxLevDistance)}return 0}else if(row.generics.length>0){if(elem.generics.length===0){if(lev===0){return 0}lev=Math.min(lev,checkIfInGenerics(row,elem,maxLevDistance));return lev}else if(lev>maxLevDistance){return checkIfInGenerics(row,elem,maxLevDistance)}else{const tmp_lev=checkGenerics(row,elem,lev,maxLevDistance);if(tmp_lev>maxLevDistance){return maxLevDistance+1}return(tmp_lev+lev)/2}}else if(elem.generics.length>0){return maxLevDistance+1}return lev}function findArg(row,elem,typeFilter,maxLevDistance){let lev=maxLevDistance+1;if(row&&row.type&&row.type.inputs&&row.type.inputs.length>0){for(const input of row.type.inputs){if(!typePassesFilter(typeFilter,input.ty)){continue}lev=Math.min(lev,checkType(input,elem,parsedQuery.literalSearch,maxLevDistance));if(lev===0){return 0}}}return parsedQuery.literalSearch?maxLevDistance+1:lev}function checkReturned(row,elem,typeFilter,maxLevDistance){let lev=maxLevDistance+1;if(row&&row.type&&row.type.output.length>0){const ret=row.type.output;for(const ret_ty of ret){if(!typePassesFilter(typeFilter,ret_ty.ty)){continue}lev=Math.min(lev,checkType(ret_ty,elem,parsedQuery.literalSearch,maxLevDistance));if(lev===0){return 0}}}return parsedQuery.literalSearch?maxLevDistance+1:lev}function checkPath(contains,ty,maxLevDistance){if(contains.length===0){return 0}let ret_lev=maxLevDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;if(clength>length){return maxLevDistance+1}for(let i=0;ilength){break}let lev_total=0;let aborted=false;for(let x=0;xmaxLevDistance){aborted=true;break}lev_total+=lev}if(!aborted){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES[filterCrates]&&ALIASES[filterCrates][lowerQuery]){const query_aliases=ALIASES[filterCrates][lowerQuery];for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{Object.keys(ALIASES).forEach(crate=>{if(ALIASES[crate][lowerQuery]){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=ALIASES[crate][lowerQuery];for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}})}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,lev,path_lev,maxLevDistance){const inBounds=lev<=maxLevDistance||index!==-1;if(lev===0||(!parsedQuery.literalSearch&&inBounds)){if(results[fullId]!==undefined){const result=results[fullId];if(result.dontValidate||result.lev<=lev){return}}results[fullId]={id:id,index:index,dontValidate:parsedQuery.literalSearch,lev:lev,path_lev:path_lev,}}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxLevDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let lev,index=-1,path_lev=0;const fullId=row.id;const searchWord=searchWords[pos];const in_args=findArg(row,elem,parsedQuery.typeFilter,maxLevDistance);const returned=checkReturned(row,elem,parsedQuery.typeFilter,maxLevDistance);addIntoResults(results_in_args,fullId,pos,-1,in_args,0,maxLevDistance);addIntoResults(results_returned,fullId,pos,-1,returned,0,maxLevDistance);if(!typePassesFilter(parsedQuery.typeFilter,row.ty)){return}const row_index=row.normalizedName.indexOf(elem.pathLast);const word_index=searchWord.indexOf(elem.pathLast);if(row_index===-1){index=word_index}else if(word_index===-1){index=row_index}else if(word_index1){path_lev=checkPath(elem.pathWithoutLast,row,maxLevDistance);if(path_lev>maxLevDistance){return}}if(parsedQuery.literalSearch){if(searchWord===elem.name){addIntoResults(results_others,fullId,pos,index,0,path_lev)}return}lev=levenshtein(searchWord,elem.pathLast);if(index===-1&&lev+path_lev>maxLevDistance){return}addIntoResults(results_others,fullId,pos,index,lev,path_lev,maxLevDistance)}function handleArgs(row,pos,results,maxLevDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let totalLev=0;let nbLev=0;function checkArgs(elems,callback){for(const elem of elems){const lev=callback(row,elem,NO_TYPE_FILTER,maxLevDistance);if(lev<=1){nbLev+=1;totalLev+=lev}else{return false}}return true}if(!checkArgs(parsedQuery.elems,findArg)){return}if(!checkArgs(parsedQuery.returned,checkReturned)){return}if(nbLev===0){return}const lev=Math.round(totalLev/nbLev);addIntoResults(results,row.id,pos,0,lev,0,maxLevDistance)}function innerRunQuery(){let elem,i,nSearchWords,in_returned,row;let queryLen=0;for(const elem of parsedQuery.elems){queryLen+=elem.name.length}for(const elem of parsedQuery.returned){queryLen+=elem.name.length}const maxLevDistance=Math.floor(queryLen/3);if(parsedQuery.foundElems===1){if(parsedQuery.elems.length===1){elem=parsedQuery.elems[0];for(i=0,nSearchWords=searchWords.length;i0){for(i=0,nSearchWords=searchWords.length;i-1||path.indexOf(key)>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(key)>-1)||levenshtein(name,key)<=maxLevDistance)){return false}}return true}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor="#"+type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){let extraClass="";if(display===true){extraClass=" active"}const output=document.createElement("div");let length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];length+=1;let extra="";if(type==="primitive"){extra=" (primitive type)"}else if(type==="keyword"){extra=" (keyword)"}const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){const alias=document.createElement("span");alias.className="alias";const bold=document.createElement("b");bold.innerText=item.alias;alias.appendChild(bold);alias.insertAdjacentHTML("beforeend"," - see ");resultName.appendChild(alias)}resultName.insertAdjacentHTML("beforeend",item.displayPath+""+name+extra+"");link.appendChild(resultName);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==searchState.loadingText))){const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";const crates_list=Object.keys(rawSearchIndex);if(crates_list.length>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function search(e,forced){if(e){e.preventDefault()}const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";if(browserSupportsHistoryApi()){const newURL=buildUrl(query.original,filterCrates);if(!history.state&&!params.search){history.pushState(null,"",newURL)}else{history.replaceState(null,"",newURL)}}showResults(execQuery(query,searchWords,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;return types.map(type=>{let pathIndex,generics;if(typeof type==="number"){pathIndex=type;generics=[]}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths)}return{name:pathIndex===0?null:lowercasePaths[pathIndex-1].name,ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:generics,}})}function buildFunctionSearchType(functionSearchType,lowercasePaths){const INPUTS_DATA=0;const OUTPUT_DATA=1;if(functionSearchType===0){return null}let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){const pathIndex=functionSearchType[INPUTS_DATA];inputs=[{name:pathIndex===0?null:lowercasePaths[pathIndex-1].name,ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:[],}]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){const pathIndex=functionSearchType[OUTPUT_DATA];output=[{name:pathIndex===0?null:lowercasePaths[pathIndex-1].name,ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:[],}]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}return{inputs,output,}}function buildIndex(rawSearchIndex){searchIndex=[];const searchWords=[];const charA="A".charCodeAt(0);let currentIndex=0;let id=0;for(const crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}let crateSize=0;const crateCorpus=rawSearchIndex[crate];searchWords.push(crate);const crateRow={crate:crate,ty:1,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),};id+=1;searchIndex.push(crateRow);currentIndex+=1;const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=crateCorpus.q;const itemDescs=crateCorpus.d;const itemParentIdxs=crateCorpus.i;const itemFunctionSearchTypes=crateCorpus.f;const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];let len=paths.length;for(let i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:buildFunctionSearchType(itemFunctionSearchTypes[i],lowercasePaths),id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){ALIASES[crate]=Object.create(null);for(const alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}for(const local_alias of aliases[alias_name]){ALIASES[crate][alias_name].push(local_alias+currentIndex)}}}currentIndex+=crateSize}return searchWords}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const params=searchState.getQueryStringParams();const query=searchState.input.value.trim();if(!history.state&&!params.search){history.pushState(null,"",buildUrl(query,null))}else{history.replaceState(null,"",buildUrl(query,null))}}currentResults=null;search(undefined,true)}const searchWords=buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}return searchWords}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch({})}})() \ No newline at end of file diff --git a/static.files/settings-0bcba95ff279c1db.css b/static.files/settings-0bcba95ff279c1db.css deleted file mode 100644 index 907d4206..00000000 --- a/static.files/settings-0bcba95ff279c1db.css +++ /dev/null @@ -1,3 +0,0 @@ -.setting-line{margin:1.2em 0.6em;position:relative;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;color:inherit;border:1px solid currentColor;outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-check input:checked{content:url('data:image/svg+xml,\ - \ - ');}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;} \ No newline at end of file diff --git a/static.files/settings-4313503d2e1961c2.js b/static.files/settings-4313503d2e1961c2.js new file mode 100644 index 00000000..ab425fe4 --- /dev/null +++ b/static.files/settings-4313503d2e1961c2.js @@ -0,0 +1,17 @@ +"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
+
${setting_name}
+
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
+
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
\ + \ +
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static.files/settings-f0c5c39777a9a2f6.js b/static.files/settings-f0c5c39777a9a2f6.js deleted file mode 100644 index 9f78bb91..00000000 --- a/static.files/settings-f0c5c39777a9a2f6.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){if(useSystem!=="false"){settingValue="system preference"}else{settingValue="light"}}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ -
-
${setting_name}
-
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ - `});output+=`\ -
-
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ -
\ - \ -
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display=""}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=function(event){event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=function(event){if(elemIsInParent(event.target,settingsMenu)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static.files/source-script-1b95b7cca98b26e5.js b/static.files/source-script-1b95b7cca98b26e5.js deleted file mode 100644 index 73a9fcd4..00000000 --- a/static.files/source-script-1b95b7cca98b26e5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=document.getElementById("rustdoc-vars").attributes["data-root-path"].value;const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;function closeSidebarIfMobile(){if(window.innerWidth"){window.rustdocMobileScrollLock();addClass(document.documentElement,"source-sidebar-expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{window.rustdocMobileScrollUnlock();removeClass(document.documentElement,"source-sidebar-expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="src-sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSourceSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="source-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(key=>{sourcesIndex[key][NAME_OFFSET]=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSourceHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(match)}});onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSourceHighlight)});highlightSourceLines();window.createSourceSidebar=createSourceSidebar})() \ No newline at end of file diff --git a/static.files/src-script-39ed315d46fb705f.js b/static.files/src-script-39ed315d46fb705f.js new file mode 100644 index 00000000..ef74f361 --- /dev/null +++ b/static.files/src-script-39ed315d46fb705f.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");getToggleLabel().innerText=">";updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");getToggleLabel().innerText="<";updateLocalStorage("source-sidebar-show","true")};function toggleSidebar(){const child=this.parentNode.children[0];if(child.innerText===">"){window.rustdocShowSourceSidebar()}else{window.rustdocCloseSourceSidebar()}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="src-sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static.files/storage-3891ce972e3a2bf8.js b/static.files/storage-3891ce972e3a2bf8.js deleted file mode 100644 index d64fa5ef..00000000 --- a/static.files/storage-3891ce972e3a2bf8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");window.mainTheme=document.getElementById("mainThemeStyle");window.RUSTDOC_MOBILE_BREAKPOINT=700;const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}const dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current!==null){return current}if(settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return null}const localStoredTheme=getSettingValue("theme");const savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){if(reversed){const length=arr.length;for(let i=length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}function switchTheme(styleElem,mainStyleElem,newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),el=>{savedHref.push(el.href)})}const newHref=savedHref.find(url=>{const m=url.match(/static\.files\/(.*)-[a-f0-9]{16}\.css$/);if(m&&m[1]===newThemeName){return true}const m2=url.match(/\/([^/]*)\.css$/);if(m2&&m2[1].startsWith(newThemeName)){return true}});if(newHref&&newHref!==styleElem.href){styleElem.href=newHref}}const updateTheme=(function(){function updateTheme(){const use=(theme,saveTheme)=>{switchTheme(window.currentTheme,window.mainTheme,theme,saveTheme)};if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(isDarkMode()){use(darkTheme,true)}else{use(lightTheme,true)}}else{use(getSettingValue("theme"),false)}}let isDarkMode;if(window.matchMedia){const mql=window.matchMedia("(prefers-color-scheme: dark)");isDarkMode=()=>mql.matches;if(mql.addEventListener){mql.addEventListener("change",updateTheme)}else{mql.addListener(updateTheme)}}else{const cssContent=getComputedStyle(document.documentElement).getPropertyValue("content");const cssColorScheme=cssContent||"\"light\"";isDarkMode=()=>(cssColorScheme==="\"dark\"")}return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"source-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0)}}) \ No newline at end of file diff --git a/static.files/storage-f2adc0d6ca4d09fb.js b/static.files/storage-f2adc0d6ca4d09fb.js new file mode 100644 index 00000000..17233608 --- /dev/null +++ b/static.files/storage-f2adc0d6ca4d09fb.js @@ -0,0 +1 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px")}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px")}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}}) \ No newline at end of file diff --git a/trait.impl/core/clone/trait.Clone.js b/trait.impl/core/clone/trait.Clone.js new file mode 100644 index 00000000..dd16dc13 --- /dev/null +++ b/trait.impl/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl Clone for EventTag"],["impl<T: Clone + Sync> Clone for PhysicalActionRef<T>"],["impl Clone for TriggerId"],["impl Clone for GlobalReactionId"],["impl Clone for PortKind"],["impl Clone for LocalReactionId"],["impl Clone for ReactorId"],["impl Clone for AsyncCtx"],["impl Clone for Offset"],["impl Clone for MicroStep"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.Eq.js b/trait.impl/core/cmp/trait.Eq.js new file mode 100644 index 00000000..87f8049f --- /dev/null +++ b/trait.impl/core/cmp/trait.Eq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl Eq for GlobalReactionId"],["impl Eq for Offset"],["impl Eq for PortKind"],["impl Eq for MicroStep"],["impl Eq for LocalReactionId"],["impl Eq for ReactorId"],["impl Eq for TriggerId"],["impl Eq for EventTag"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.Ord.js b/trait.impl/core/cmp/trait.Ord.js new file mode 100644 index 00000000..025894fd --- /dev/null +++ b/trait.impl/core/cmp/trait.Ord.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl Ord for LocalReactionId"],["impl Ord for ReactorId"],["impl Ord for EventTag"],["impl Ord for MicroStep"],["impl Ord for TriggerId"],["impl Ord for GlobalReactionId"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialEq.js b/trait.impl/core/cmp/trait.PartialEq.js new file mode 100644 index 00000000..2badab73 --- /dev/null +++ b/trait.impl/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl PartialEq for PortKind"],["impl PartialEq for EventTag"],["impl PartialEq for Offset"],["impl PartialEq for LocalReactionId"],["impl PartialEq for GlobalReactionId"],["impl PartialEq for TriggerId"],["impl PartialEq for ReactorId"],["impl PartialEq for MicroStep"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialOrd.js b/trait.impl/core/cmp/trait.PartialOrd.js new file mode 100644 index 00000000..ea352910 --- /dev/null +++ b/trait.impl/core/cmp/trait.PartialOrd.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl PartialOrd for EventTag"],["impl PartialOrd for GlobalReactionId"],["impl PartialOrd for MicroStep"],["impl PartialOrd for TriggerId"],["impl PartialOrd for ReactorId"],["impl PartialOrd for LocalReactionId"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/convert/trait.TryFrom.js b/trait.impl/core/convert/trait.TryFrom.js similarity index 76% rename from implementors/core/convert/trait.TryFrom.js rename to trait.impl/core/convert/trait.TryFrom.js index 3f05db43..13ca6810 100644 --- a/implementors/core/convert/trait.TryFrom.js +++ b/trait.impl/core/convert/trait.TryFrom.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"reactor_rt":[["impl TryFrom<&str> for TimeUnit"]] +"reactor_rt":[["impl TryFrom<&str> for TimeUnit"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/default/trait.Default.js b/trait.impl/core/default/trait.Default.js new file mode 100644 index 00000000..8748fe5b --- /dev/null +++ b/trait.impl/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl Default for SchedulerOptions"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Debug.js b/trait.impl/core/fmt/trait.Debug.js new file mode 100644 index 00000000..64da41fa --- /dev/null +++ b/trait.impl/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl Debug for LocalReactionId"],["impl Debug for TimeUnit"],["impl Debug for Offset"],["impl Debug for GlobalReactionId"],["impl Debug for ReactorId"],["impl Debug for MicroStep"],["impl Debug for PortKind"],["impl Debug for TriggerId"],["impl Debug for EventTag"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Display.js b/trait.impl/core/fmt/trait.Display.js new file mode 100644 index 00000000..df149b11 --- /dev/null +++ b/trait.impl/core/fmt/trait.Display.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl Display for EventTag"],["impl Display for LocalReactionId"],["impl Display for GlobalReactionId"],["impl Display for ReactorId"],["impl Display for MicroStep"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/hash/trait.Hash.js b/trait.impl/core/hash/trait.Hash.js new file mode 100644 index 00000000..450338dc --- /dev/null +++ b/trait.impl/core/hash/trait.Hash.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl Hash for PortKind"],["impl Hash for TriggerId"],["impl Hash for ReactorId"],["impl Hash for LocalReactionId"],["impl Hash for MicroStep"],["impl Hash for GlobalReactionId"],["impl Hash for Offset"],["impl Hash for EventTag"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/collect/trait.IntoIterator.js b/trait.impl/core/iter/traits/collect/trait.IntoIterator.js new file mode 100644 index 00000000..ffb59d9e --- /dev/null +++ b/trait.impl/core/iter/traits/collect/trait.IntoIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl<'a, T: Sync> IntoIterator for &'a Multiport<T>"],["impl<'a, T: Sync> IntoIterator for &'a mut Multiport<T>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Copy.js b/trait.impl/core/marker/trait.Copy.js new file mode 100644 index 00000000..79cbb631 --- /dev/null +++ b/trait.impl/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl Copy for GlobalReactionId"],["impl Copy for TriggerId"],["impl Copy for LocalReactionId"],["impl Copy for PortKind"],["impl Copy for EventTag"],["impl Copy for ReactorId"],["impl Copy for MicroStep"],["impl Copy for Offset"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Freeze.js b/trait.impl/core/marker/trait.Freeze.js new file mode 100644 index 00000000..cbd89d4a --- /dev/null +++ b/trait.impl/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl<T> Freeze for LogicalAction<T>",1,["reactor_rt::actions::LogicalAction"]],["impl<T> Freeze for PhysicalAction<T>",1,["reactor_rt::actions::PhysicalAction"]],["impl<T> Freeze for PhysicalActionRef<T>",1,["reactor_rt::actions::PhysicalActionRef"]],["impl Freeze for LocalReactionId",1,["reactor_rt::ids::LocalReactionId"]],["impl Freeze for ReactorId",1,["reactor_rt::ids::ReactorId"]],["impl Freeze for GlobalReactionId",1,["reactor_rt::ids::GlobalReactionId"]],["impl<T> Freeze for Port<T>",1,["reactor_rt::ports::Port"]],["impl<T> Freeze for Multiport<T>",1,["reactor_rt::ports::Multiport"]],["impl<'x, S> Freeze for AssemblyCtx<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyCtx"]],["impl<'x, S> Freeze for FinishedReactor<'x, S>
where\n S: Freeze,
",1,["reactor_rt::scheduler::assembly_impl::FinishedReactor"]],["impl<'x, S> Freeze for AssemblyIntermediate<'x, S>
where\n S: Freeze,
",1,["reactor_rt::scheduler::assembly_impl::AssemblyIntermediate"]],["impl<'a, 'x, S> Freeze for DependencyDeclarator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::DependencyDeclarator"]],["impl<'a, 'x, S> Freeze for ComponentCreator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::ComponentCreator"]],["impl<'a, 'x> Freeze for ReactionCtx<'a, 'x>",1,["reactor_rt::scheduler::context::ReactionCtx"]],["impl Freeze for AsyncCtx",1,["reactor_rt::scheduler::context::AsyncCtx"]],["impl Freeze for Offset",1,["reactor_rt::scheduler::context::Offset"]],["impl Freeze for EventTag",1,["reactor_rt::scheduler::events::EventTag"]],["impl Freeze for SchedulerOptions",1,["reactor_rt::scheduler::scheduler_impl::SchedulerOptions"]],["impl<'x> Freeze for SyncScheduler<'x>",1,["reactor_rt::scheduler::scheduler_impl::SyncScheduler"]],["impl Freeze for MicroStep",1,["reactor_rt::time::MicroStep"]],["impl Freeze for Timer",1,["reactor_rt::timers::Timer"]],["impl Freeze for TriggerId",1,["reactor_rt::triggers::TriggerId"]],["impl Freeze for TimeUnit",1,["reactor_rt::util::TimeUnit"]],["impl Freeze for AssemblyError",1,["reactor_rt::assembly::AssemblyError"]],["impl Freeze for PortKind",1,["reactor_rt::assembly::PortKind"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Send.js b/trait.impl/core/marker/trait.Send.js new file mode 100644 index 00000000..4019c1f4 --- /dev/null +++ b/trait.impl/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl<T> Send for LogicalAction<T>
where\n T: Send,
",1,["reactor_rt::actions::LogicalAction"]],["impl<T> Send for PhysicalAction<T>
where\n T: Send,
",1,["reactor_rt::actions::PhysicalAction"]],["impl<T> Send for PhysicalActionRef<T>
where\n T: Send,
",1,["reactor_rt::actions::PhysicalActionRef"]],["impl Send for LocalReactionId",1,["reactor_rt::ids::LocalReactionId"]],["impl Send for ReactorId",1,["reactor_rt::ids::ReactorId"]],["impl Send for GlobalReactionId",1,["reactor_rt::ids::GlobalReactionId"]],["impl<T> !Send for Port<T>",1,["reactor_rt::ports::Port"]],["impl<T> !Send for Multiport<T>",1,["reactor_rt::ports::Multiport"]],["impl<'x, S> !Send for AssemblyCtx<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyCtx"]],["impl<'x, S> !Send for FinishedReactor<'x, S>",1,["reactor_rt::scheduler::assembly_impl::FinishedReactor"]],["impl<'x, S> !Send for AssemblyIntermediate<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyIntermediate"]],["impl<'a, 'x, S> !Send for DependencyDeclarator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::DependencyDeclarator"]],["impl<'a, 'x, S> !Send for ComponentCreator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::ComponentCreator"]],["impl<'a, 'x> Send for ReactionCtx<'a, 'x>",1,["reactor_rt::scheduler::context::ReactionCtx"]],["impl Send for AsyncCtx",1,["reactor_rt::scheduler::context::AsyncCtx"]],["impl Send for Offset",1,["reactor_rt::scheduler::context::Offset"]],["impl Send for EventTag",1,["reactor_rt::scheduler::events::EventTag"]],["impl Send for SchedulerOptions",1,["reactor_rt::scheduler::scheduler_impl::SchedulerOptions"]],["impl<'x> !Send for SyncScheduler<'x>",1,["reactor_rt::scheduler::scheduler_impl::SyncScheduler"]],["impl Send for MicroStep",1,["reactor_rt::time::MicroStep"]],["impl Send for Timer",1,["reactor_rt::timers::Timer"]],["impl Send for TriggerId",1,["reactor_rt::triggers::TriggerId"]],["impl Send for TimeUnit",1,["reactor_rt::util::TimeUnit"]],["impl Send for AssemblyError",1,["reactor_rt::assembly::AssemblyError"]],["impl Send for PortKind",1,["reactor_rt::assembly::PortKind"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.StructuralEq.js b/trait.impl/core/marker/trait.StructuralEq.js new file mode 100644 index 00000000..8ab9a85f --- /dev/null +++ b/trait.impl/core/marker/trait.StructuralEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl StructuralEq for GlobalReactionId"],["impl StructuralEq for PortKind"],["impl StructuralEq for EventTag"],["impl StructuralEq for ReactorId"],["impl StructuralEq for MicroStep"],["impl StructuralEq for LocalReactionId"],["impl StructuralEq for TriggerId"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.StructuralPartialEq.js b/trait.impl/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 00000000..cee7f1c7 --- /dev/null +++ b/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl StructuralPartialEq for MicroStep"],["impl StructuralPartialEq for TriggerId"],["impl StructuralPartialEq for EventTag"],["impl StructuralPartialEq for ReactorId"],["impl StructuralPartialEq for PortKind"],["impl StructuralPartialEq for LocalReactionId"],["impl StructuralPartialEq for GlobalReactionId"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Sync.js b/trait.impl/core/marker/trait.Sync.js new file mode 100644 index 00000000..3b71db58 --- /dev/null +++ b/trait.impl/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl<T> Sync for LogicalAction<T>",1,["reactor_rt::actions::LogicalAction"]],["impl<T> Sync for PhysicalAction<T>",1,["reactor_rt::actions::PhysicalAction"]],["impl<T> Sync for PhysicalActionRef<T>
where\n T: Send,
",1,["reactor_rt::actions::PhysicalActionRef"]],["impl Sync for LocalReactionId",1,["reactor_rt::ids::LocalReactionId"]],["impl Sync for ReactorId",1,["reactor_rt::ids::ReactorId"]],["impl Sync for GlobalReactionId",1,["reactor_rt::ids::GlobalReactionId"]],["impl<T> !Sync for Port<T>",1,["reactor_rt::ports::Port"]],["impl<T> !Sync for Multiport<T>",1,["reactor_rt::ports::Multiport"]],["impl<'x, S> !Sync for AssemblyCtx<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyCtx"]],["impl<'x, S> !Sync for FinishedReactor<'x, S>",1,["reactor_rt::scheduler::assembly_impl::FinishedReactor"]],["impl<'x, S> !Sync for AssemblyIntermediate<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyIntermediate"]],["impl<'a, 'x, S> !Sync for DependencyDeclarator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::DependencyDeclarator"]],["impl<'a, 'x, S> !Sync for ComponentCreator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::ComponentCreator"]],["impl<'a, 'x> Sync for ReactionCtx<'a, 'x>",1,["reactor_rt::scheduler::context::ReactionCtx"]],["impl Sync for AsyncCtx",1,["reactor_rt::scheduler::context::AsyncCtx"]],["impl Sync for Offset",1,["reactor_rt::scheduler::context::Offset"]],["impl Sync for EventTag",1,["reactor_rt::scheduler::events::EventTag"]],["impl Sync for SchedulerOptions",1,["reactor_rt::scheduler::scheduler_impl::SchedulerOptions"]],["impl<'x> !Sync for SyncScheduler<'x>",1,["reactor_rt::scheduler::scheduler_impl::SyncScheduler"]],["impl Sync for MicroStep",1,["reactor_rt::time::MicroStep"]],["impl Sync for Timer",1,["reactor_rt::timers::Timer"]],["impl Sync for TriggerId",1,["reactor_rt::triggers::TriggerId"]],["impl Sync for TimeUnit",1,["reactor_rt::util::TimeUnit"]],["impl Sync for AssemblyError",1,["reactor_rt::assembly::AssemblyError"]],["impl Sync for PortKind",1,["reactor_rt::assembly::PortKind"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Unpin.js b/trait.impl/core/marker/trait.Unpin.js new file mode 100644 index 00000000..ba052fc8 --- /dev/null +++ b/trait.impl/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl<T> Unpin for LogicalAction<T>
where\n T: Unpin,
",1,["reactor_rt::actions::LogicalAction"]],["impl<T> Unpin for PhysicalAction<T>
where\n T: Unpin,
",1,["reactor_rt::actions::PhysicalAction"]],["impl<T> Unpin for PhysicalActionRef<T>",1,["reactor_rt::actions::PhysicalActionRef"]],["impl Unpin for LocalReactionId",1,["reactor_rt::ids::LocalReactionId"]],["impl Unpin for ReactorId",1,["reactor_rt::ids::ReactorId"]],["impl Unpin for GlobalReactionId",1,["reactor_rt::ids::GlobalReactionId"]],["impl<T> Unpin for Port<T>",1,["reactor_rt::ports::Port"]],["impl<T> Unpin for Multiport<T>",1,["reactor_rt::ports::Multiport"]],["impl<'x, S> Unpin for AssemblyCtx<'x, S>
where\n S: Unpin,
",1,["reactor_rt::scheduler::assembly_impl::AssemblyCtx"]],["impl<'x, S> Unpin for FinishedReactor<'x, S>
where\n S: Unpin,
",1,["reactor_rt::scheduler::assembly_impl::FinishedReactor"]],["impl<'x, S> Unpin for AssemblyIntermediate<'x, S>
where\n S: Unpin,
",1,["reactor_rt::scheduler::assembly_impl::AssemblyIntermediate"]],["impl<'a, 'x, S> Unpin for DependencyDeclarator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::DependencyDeclarator"]],["impl<'a, 'x, S> Unpin for ComponentCreator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::ComponentCreator"]],["impl<'a, 'x> Unpin for ReactionCtx<'a, 'x>",1,["reactor_rt::scheduler::context::ReactionCtx"]],["impl Unpin for AsyncCtx",1,["reactor_rt::scheduler::context::AsyncCtx"]],["impl Unpin for Offset",1,["reactor_rt::scheduler::context::Offset"]],["impl Unpin for EventTag",1,["reactor_rt::scheduler::events::EventTag"]],["impl Unpin for SchedulerOptions",1,["reactor_rt::scheduler::scheduler_impl::SchedulerOptions"]],["impl<'x> Unpin for SyncScheduler<'x>",1,["reactor_rt::scheduler::scheduler_impl::SyncScheduler"]],["impl Unpin for MicroStep",1,["reactor_rt::time::MicroStep"]],["impl Unpin for Timer",1,["reactor_rt::timers::Timer"]],["impl Unpin for TriggerId",1,["reactor_rt::triggers::TriggerId"]],["impl Unpin for TimeUnit",1,["reactor_rt::util::TimeUnit"]],["impl Unpin for AssemblyError",1,["reactor_rt::assembly::AssemblyError"]],["impl Unpin for PortKind",1,["reactor_rt::assembly::PortKind"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/ops/arith/trait.Add.js b/trait.impl/core/ops/arith/trait.Add.js similarity index 76% rename from implementors/core/ops/arith/trait.Add.js rename to trait.impl/core/ops/arith/trait.Add.js index 15fcfda6..3b42bbfa 100644 --- a/implementors/core/ops/arith/trait.Add.js +++ b/trait.impl/core/ops/arith/trait.Add.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"reactor_rt":[["impl Add<u32> for MicroStep"]] +"reactor_rt":[["impl Add<u32> for MicroStep"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/ops/index/trait.Index.js b/trait.impl/core/ops/index/trait.Index.js similarity index 58% rename from implementors/core/ops/index/trait.Index.js rename to trait.impl/core/ops/index/trait.Index.js index edf5cded..17b692f7 100644 --- a/implementors/core/ops/index/trait.Index.js +++ b/trait.impl/core/ops/index/trait.Index.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"reactor_rt":[["impl<T: Sync> Index<usize> for Multiport<T>"]] +"reactor_rt":[["impl<T: Sync> Index<usize> for Multiport<T>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/ops/index/trait.IndexMut.js b/trait.impl/core/ops/index/trait.IndexMut.js similarity index 57% rename from implementors/core/ops/index/trait.IndexMut.js rename to trait.impl/core/ops/index/trait.IndexMut.js index ffc6ae40..c5aee81a 100644 --- a/implementors/core/ops/index/trait.IndexMut.js +++ b/trait.impl/core/ops/index/trait.IndexMut.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"reactor_rt":[["impl<T: Sync> IndexMut<usize> for Multiport<T>"]] +"reactor_rt":[["impl<T: Sync> IndexMut<usize> for Multiport<T>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js new file mode 100644 index 00000000..09dcb8bb --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl<T> RefUnwindSafe for LogicalAction<T>
where\n T: RefUnwindSafe,
",1,["reactor_rt::actions::LogicalAction"]],["impl<T> RefUnwindSafe for PhysicalAction<T>
where\n T: RefUnwindSafe,
",1,["reactor_rt::actions::PhysicalAction"]],["impl<T> RefUnwindSafe for PhysicalActionRef<T>",1,["reactor_rt::actions::PhysicalActionRef"]],["impl RefUnwindSafe for LocalReactionId",1,["reactor_rt::ids::LocalReactionId"]],["impl RefUnwindSafe for ReactorId",1,["reactor_rt::ids::ReactorId"]],["impl RefUnwindSafe for GlobalReactionId",1,["reactor_rt::ids::GlobalReactionId"]],["impl<T> !RefUnwindSafe for Port<T>",1,["reactor_rt::ports::Port"]],["impl<T> !RefUnwindSafe for Multiport<T>",1,["reactor_rt::ports::Multiport"]],["impl<'x, S> !RefUnwindSafe for AssemblyCtx<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyCtx"]],["impl<'x, S> !RefUnwindSafe for FinishedReactor<'x, S>",1,["reactor_rt::scheduler::assembly_impl::FinishedReactor"]],["impl<'x, S> !RefUnwindSafe for AssemblyIntermediate<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyIntermediate"]],["impl<'a, 'x, S> !RefUnwindSafe for DependencyDeclarator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::DependencyDeclarator"]],["impl<'a, 'x, S> !RefUnwindSafe for ComponentCreator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::ComponentCreator"]],["impl<'a, 'x> RefUnwindSafe for ReactionCtx<'a, 'x>",1,["reactor_rt::scheduler::context::ReactionCtx"]],["impl RefUnwindSafe for AsyncCtx",1,["reactor_rt::scheduler::context::AsyncCtx"]],["impl RefUnwindSafe for Offset",1,["reactor_rt::scheduler::context::Offset"]],["impl RefUnwindSafe for EventTag",1,["reactor_rt::scheduler::events::EventTag"]],["impl RefUnwindSafe for SchedulerOptions",1,["reactor_rt::scheduler::scheduler_impl::SchedulerOptions"]],["impl<'x> !RefUnwindSafe for SyncScheduler<'x>",1,["reactor_rt::scheduler::scheduler_impl::SyncScheduler"]],["impl RefUnwindSafe for MicroStep",1,["reactor_rt::time::MicroStep"]],["impl RefUnwindSafe for Timer",1,["reactor_rt::timers::Timer"]],["impl RefUnwindSafe for TriggerId",1,["reactor_rt::triggers::TriggerId"]],["impl RefUnwindSafe for TimeUnit",1,["reactor_rt::util::TimeUnit"]],["impl RefUnwindSafe for AssemblyError",1,["reactor_rt::assembly::AssemblyError"]],["impl RefUnwindSafe for PortKind",1,["reactor_rt::assembly::PortKind"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js new file mode 100644 index 00000000..085fafc2 --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl<T> UnwindSafe for LogicalAction<T>
where\n T: UnwindSafe,
",1,["reactor_rt::actions::LogicalAction"]],["impl<T> UnwindSafe for PhysicalAction<T>
where\n T: UnwindSafe,
",1,["reactor_rt::actions::PhysicalAction"]],["impl<T> UnwindSafe for PhysicalActionRef<T>",1,["reactor_rt::actions::PhysicalActionRef"]],["impl UnwindSafe for LocalReactionId",1,["reactor_rt::ids::LocalReactionId"]],["impl UnwindSafe for ReactorId",1,["reactor_rt::ids::ReactorId"]],["impl UnwindSafe for GlobalReactionId",1,["reactor_rt::ids::GlobalReactionId"]],["impl<T> !UnwindSafe for Port<T>",1,["reactor_rt::ports::Port"]],["impl<T> !UnwindSafe for Multiport<T>",1,["reactor_rt::ports::Multiport"]],["impl<'x, S> !UnwindSafe for AssemblyCtx<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyCtx"]],["impl<'x, S> !UnwindSafe for FinishedReactor<'x, S>",1,["reactor_rt::scheduler::assembly_impl::FinishedReactor"]],["impl<'x, S> !UnwindSafe for AssemblyIntermediate<'x, S>",1,["reactor_rt::scheduler::assembly_impl::AssemblyIntermediate"]],["impl<'a, 'x, S> !UnwindSafe for DependencyDeclarator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::DependencyDeclarator"]],["impl<'a, 'x, S> !UnwindSafe for ComponentCreator<'a, 'x, S>",1,["reactor_rt::scheduler::assembly_impl::ComponentCreator"]],["impl<'a, 'x> UnwindSafe for ReactionCtx<'a, 'x>",1,["reactor_rt::scheduler::context::ReactionCtx"]],["impl UnwindSafe for AsyncCtx",1,["reactor_rt::scheduler::context::AsyncCtx"]],["impl UnwindSafe for Offset",1,["reactor_rt::scheduler::context::Offset"]],["impl UnwindSafe for EventTag",1,["reactor_rt::scheduler::events::EventTag"]],["impl UnwindSafe for SchedulerOptions",1,["reactor_rt::scheduler::scheduler_impl::SchedulerOptions"]],["impl<'x> !UnwindSafe for SyncScheduler<'x>",1,["reactor_rt::scheduler::scheduler_impl::SyncScheduler"]],["impl UnwindSafe for MicroStep",1,["reactor_rt::time::MicroStep"]],["impl UnwindSafe for Timer",1,["reactor_rt::timers::Timer"]],["impl UnwindSafe for TriggerId",1,["reactor_rt::triggers::TriggerId"]],["impl UnwindSafe for TimeUnit",1,["reactor_rt::util::TimeUnit"]],["impl UnwindSafe for AssemblyError",1,["reactor_rt::assembly::AssemblyError"]],["impl UnwindSafe for PortKind",1,["reactor_rt::assembly::PortKind"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/index_vec/trait.Idx.js b/trait.impl/index_vec/trait.Idx.js new file mode 100644 index 00000000..9131687a --- /dev/null +++ b/trait.impl/index_vec/trait.Idx.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"reactor_rt":[["impl Idx for TriggerId"],["impl Idx for ReactorId"],["impl Idx for LocalReactionId"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/reactor_rt/scheduler/context/trait.SchedulableAsAction.js b/trait.impl/reactor_rt/scheduler/context/trait.SchedulableAsAction.js similarity index 100% rename from implementors/reactor_rt/scheduler/context/trait.SchedulableAsAction.js rename to trait.impl/reactor_rt/scheduler/context/trait.SchedulableAsAction.js diff --git a/implementors/reactor_rt/triggers/trait.ReactionTrigger.js b/trait.impl/reactor_rt/triggers/trait.ReactionTrigger.js similarity index 100% rename from implementors/reactor_rt/triggers/trait.ReactionTrigger.js rename to trait.impl/reactor_rt/triggers/trait.ReactionTrigger.js diff --git a/type.impl/core/result/enum.Result.js b/type.impl/core/result/enum.Result.js new file mode 100644 index 00000000..2fb7260f --- /dev/null +++ b/type.impl/core/result/enum.Result.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"reactor_rt":[["
source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: unstable) · source

pub fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls the provided closure with a reference to the contained value (if Ok).

\n
Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls the provided closure with a reference to the contained error (if Err).

\n
Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
Safety
\n

Calling this method on an Err is undefined behavior.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
Safety
\n

Calling this method on an Ok is undefined behavior.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"reactor_rt::assembly::AssemblyResult"],["
source§

impl<T, E> Result<&T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"reactor_rt::assembly::AssemblyResult"],["
source§

impl<T, E> Result<&mut T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"reactor_rt::assembly::AssemblyResult"],["
source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: unstable) · source

pub fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"reactor_rt::assembly::AssemblyResult"],["
source§

impl<T, E> Result<Result<T, E>, E>

source

pub fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"reactor_rt::assembly::AssemblyResult"],["
1.61.0 · source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","reactor_rt::assembly::AssemblyResult"],["
1.0.0 · source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","reactor_rt::assembly::AssemblyResult"],["
1.16.0 · source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","reactor_rt::assembly::AssemblyResult"],["
source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","reactor_rt::assembly::AssemblyResult"],["
source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","reactor_rt::assembly::AssemblyResult"],["
source§

impl<T, E> Try for Result<T, E>

§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
source§

fn branch(\n self\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","reactor_rt::assembly::AssemblyResult"],["
1.0.0 · source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","reactor_rt::assembly::AssemblyResult"],["
1.0.0 · source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","reactor_rt::assembly::AssemblyResult"],["
1.0.0 · source§

impl<T, E> StructuralEq for Result<T, E>

","StructuralEq","reactor_rt::assembly::AssemblyResult"],["
1.0.0 · source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","reactor_rt::assembly::AssemblyResult"],["
1.0.0 · source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","reactor_rt::assembly::AssemblyResult"],["
1.0.0 · source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","reactor_rt::assembly::AssemblyResult"],["
source§

impl<T, E> Residual<T> for Result<Infallible, E>

§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","reactor_rt::assembly::AssemblyResult"],["
1.0.0 · source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

source§

fn eq(&self, other: &Result<T, E>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","reactor_rt::assembly::AssemblyResult"],["
1.0.0 · source§

impl<T, E> IntoIterator for Result<T, E>

source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","reactor_rt::assembly::AssemblyResult"],["
1.16.0 · source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","reactor_rt::assembly::AssemblyResult"],["
1.0.0 · source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","reactor_rt::assembly::AssemblyResult"],["
1.0.0 · source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

source§

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

Formats the value using the given formatter. Read more
","Debug","reactor_rt::assembly::AssemblyResult"],["
1.0.0 · source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","reactor_rt::assembly::AssemblyResult"],["
source§

impl<C, E> ControlFlow for Result<C, E>
where\n C: ControlFlow,

","ControlFlow","reactor_rt::assembly::AssemblyResult"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/std/primitive.unit.js b/type.impl/std/primitive.unit.js new file mode 100644 index 00000000..cd47efb1 --- /dev/null +++ b/type.impl/std/primitive.unit.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"reactor_rt":[] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/vecmap/all.html b/vecmap/all.html deleted file mode 100644 index 8a76ae68..00000000 --- a/vecmap/all.html +++ /dev/null @@ -1 +0,0 @@ -List of all items in this crate

List of all items

Structs

Enums

\ No newline at end of file diff --git a/vecmap/enum.Entry.html b/vecmap/enum.Entry.html deleted file mode 100644 index 1c16a6e1..00000000 --- a/vecmap/enum.Entry.html +++ /dev/null @@ -1,26 +0,0 @@ -Entry in vecmap - Rust

Enum vecmap::Entry

source ·
pub enum Entry<'a, K, V>where
-    K: Ord + Eq,{
-    Vacant(VacantEntry<'a, K, V>),
-    Occupied(OccupiedEntry<'a, K, V>),
-}
Expand description

A view into a single entry in a map, which may either be vacant or occupied.

-

Variants§

§

Vacant(VacantEntry<'a, K, V>)

A vacant Entry

-
§

Occupied(OccupiedEntry<'a, K, V>)

An occupied Entry

-

Implementations§

source§

impl<K, V> Entry<'_, K, V>where - K: Ord + Eq,

source

pub fn keyref(&self) -> KeyRef<&K>

Auto Trait Implementations§

§

impl<'a, K, V> RefUnwindSafe for Entry<'a, K, V>where - K: RefUnwindSafe, - V: RefUnwindSafe,

§

impl<'a, K, V> Send for Entry<'a, K, V>where - K: Send, - V: Send,

§

impl<'a, K, V> Sync for Entry<'a, K, V>where - K: Sync, - V: Sync,

§

impl<'a, K, V> Unpin for Entry<'a, K, V>where - K: Unpin,

§

impl<'a, K, V> !UnwindSafe for Entry<'a, K, V>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file diff --git a/vecmap/index.html b/vecmap/index.html deleted file mode 100644 index 237d080f..00000000 --- a/vecmap/index.html +++ /dev/null @@ -1,5 +0,0 @@ -vecmap - Rust

Crate vecmap

source ·
Expand description

This is a formally verified implementation of a sparse map that uses Vec underneath. -Entries are retained in sorted order by key to facilitate fast search.

-

Structs

  • A key zipped with its internal index in this map. -For some operations, like manually implemented iteration, -the index can be used for optimisation.
  • An occupied Entry.
  • A vacant Entry.
  • A sparse map representation over a totally ordered key type.

Enums

  • A view into a single entry in a map, which may either be vacant or occupied.
\ No newline at end of file diff --git a/vecmap/sidebar-items.js b/vecmap/sidebar-items.js deleted file mode 100644 index b2649e9d..00000000 --- a/vecmap/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"enum":["Entry"],"struct":["KeyRef","OccupiedEntry","VacantEntry","VecMap"]}; \ No newline at end of file diff --git a/vecmap/struct.KeyRef.html b/vecmap/struct.KeyRef.html deleted file mode 100644 index 6eafcb39..00000000 --- a/vecmap/struct.KeyRef.html +++ /dev/null @@ -1,24 +0,0 @@ -KeyRef in vecmap - Rust

Struct vecmap::KeyRef

source ·
pub struct KeyRef<K> {
-    pub key: K,
-    /* private fields */
-}
Expand description

A key zipped with its internal index in this map. -For some operations, like manually implemented iteration, -the index can be used for optimisation.

-

Fields§

§key: K

Implementations§

source§

impl<K: Clone> KeyRef<&K>

source

pub fn cloned(self) -> KeyRef<K>

source§

impl<K> KeyRef<K>

source

pub fn as_ref(&self) -> KeyRef<&K>

Trait Implementations§

source§

impl<K: Clone> Clone for KeyRef<K>

source§

fn clone(&self) -> KeyRef<K>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<K: Display> Display for KeyRef<K>

source§

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

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

impl<K> From<K> for KeyRef<K>

source§

fn from(key: K) -> Self

Converts to this type from the input type.
source§

impl<K: Copy> Copy for KeyRef<K>

Auto Trait Implementations§

§

impl<K> RefUnwindSafe for KeyRef<K>where - K: RefUnwindSafe,

§

impl<K> Send for KeyRef<K>where - K: Send,

§

impl<K> Sync for KeyRef<K>where - K: Sync,

§

impl<K> Unpin for KeyRef<K>where - K: Unpin,

§

impl<K> UnwindSafe for KeyRef<K>where - K: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

const: unstable · source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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> ToOwned for Twhere - T: Clone,

§

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> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file diff --git a/vecmap/struct.OccupiedEntry.html b/vecmap/struct.OccupiedEntry.html deleted file mode 100644 index a412165a..00000000 --- a/vecmap/struct.OccupiedEntry.html +++ /dev/null @@ -1,23 +0,0 @@ -OccupiedEntry in vecmap - Rust

Struct vecmap::OccupiedEntry

source ·
pub struct OccupiedEntry<'a, K, V>where
-    K: Ord + Eq,{ /* private fields */ }
Expand description

An occupied Entry.

-

Implementations§

source§

impl<K, V> OccupiedEntry<'_, K, V>where - K: Ord + Eq,

source

pub fn replace(&mut self, value: V)

Replaces the entry’s value with value.

-
source

pub fn get_mut(&mut self) -> &mut V

Gets the mutable ref to the entry’s value.

-

Auto Trait Implementations§

§

impl<'a, K, V> RefUnwindSafe for OccupiedEntry<'a, K, V>where - K: RefUnwindSafe, - V: RefUnwindSafe,

§

impl<'a, K, V> Send for OccupiedEntry<'a, K, V>where - K: Send, - V: Send,

§

impl<'a, K, V> Sync for OccupiedEntry<'a, K, V>where - K: Sync, - V: Sync,

§

impl<'a, K, V> Unpin for OccupiedEntry<'a, K, V>where - K: Unpin,

§

impl<'a, K, V> !UnwindSafe for OccupiedEntry<'a, K, V>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file diff --git a/vecmap/struct.VacantEntry.html b/vecmap/struct.VacantEntry.html deleted file mode 100644 index f75a20bb..00000000 --- a/vecmap/struct.VacantEntry.html +++ /dev/null @@ -1,22 +0,0 @@ -VacantEntry in vecmap - Rust

Struct vecmap::VacantEntry

source ·
pub struct VacantEntry<'a, K, V>where
-    K: Ord + Eq,{ /* private fields */ }
Expand description

A vacant Entry.

-

Implementations§

source§

impl<K, V> VacantEntry<'_, K, V>where - K: Ord + Eq,

source

pub fn insert(self, value: V)

Sets the value of the entry with the VacantEntry’s key.

-

Auto Trait Implementations§

§

impl<'a, K, V> RefUnwindSafe for VacantEntry<'a, K, V>where - K: RefUnwindSafe, - V: RefUnwindSafe,

§

impl<'a, K, V> Send for VacantEntry<'a, K, V>where - K: Send, - V: Send,

§

impl<'a, K, V> Sync for VacantEntry<'a, K, V>where - K: Sync, - V: Sync,

§

impl<'a, K, V> Unpin for VacantEntry<'a, K, V>where - K: Unpin,

§

impl<'a, K, V> !UnwindSafe for VacantEntry<'a, K, V>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file diff --git a/vecmap/struct.VecMap.html b/vecmap/struct.VecMap.html deleted file mode 100644 index 4f4940a6..00000000 --- a/vecmap/struct.VecMap.html +++ /dev/null @@ -1,54 +0,0 @@ -VecMap in vecmap - Rust

Struct vecmap::VecMap

source ·
pub struct VecMap<K, V>where
-    K: Eq + Ord,{ /* private fields */ }
Expand description

A sparse map representation over a totally ordered key type.

-

Implementations§

source§

impl<K, V> VecMap<K, V>where - K: Eq + Ord,

source

pub fn new() -> Self

source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V>

Find an entry with assumption that the key is random access. -Logarithmic complexity.

-
source

pub fn entry_from_ref(&mut self, key_hint: KeyRef<K>, key: K) -> Entry<'_, K, V>

Find the entry matching key. Use key_hint to accelerate search. -The function will use the provided hint to skip items before it.
-Note: This function makes two assumptions about your input:

-
    -
  • key_hint is valid, i.e. the underlying key is in the map and since extracting -the reference, no item has been removed from the map
  • -
  • key_hint.key <= key
  • -
-

If either of these assumptions is violated, you might obtain an entry which allows -destroying the well-kept order of the items.

-
source

pub fn find_random_mapping_after( - &self, - min_key_inclusive: K -) -> Option<(KeyRef<&K>, &V)>

Finds entry reference, either directly associated with min_key_inclusive, or the entry with the -closest key (in terms of sorting order) greater than min_key_inclusive. Returns None if -map does not contain entry with key greater or equal to min_key_inclusive.

-
source

pub fn insert(&mut self, key: K, value: V) -> Option<V>

Insert value for key in the map. If key is already contained, the function -replaces the previously held value and returns it.

-
source

pub fn remove(&mut self, key: &K) -> Option<V>

Removes the item with key and returns its value. If no such item exists, -it does nothing.

-
source

pub fn get(&self, key: &K) -> Option<&V>

Get the value associated with key, if it exists.

-
source

pub fn contains_key(&self, key: &K) -> bool

Checks if key is contained in the map.

-
source

pub fn next_mapping(&self, key: KeyRef<&K>) -> Option<(KeyRef<&K>, &V)>

Produces the first mapping that follows the given key -in the ascending order of keys.

-
source

pub fn iter(&self) -> impl Iterator<Item = &(K, V)> + '_

Iterate over all key-value paris in the map.

-
source

pub fn min_entry(&self) -> Option<(KeyRef<&K>, &V)>

Obtain keyref-value pair of the item with the smallest key, unless the map is empty.

-
source

pub fn max_key(&self) -> Option<&K>

Obtain the key of the item with the greatest key, unless the map is empty.

-

Trait Implementations§

source§

impl<K: Clone + Eq + Ord, V: Clone> Clone for VecMap<K, V>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<K: Ord + Eq + Debug, V: Debug> Debug for VecMap<K, V>

source§

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

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

impl<K: Ord + Eq, V> Default for VecMap<K, V>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<K, V> RefUnwindSafe for VecMap<K, V>where - K: RefUnwindSafe, - V: RefUnwindSafe,

§

impl<K, V> Send for VecMap<K, V>where - K: Send, - V: Send,

§

impl<K, V> Sync for VecMap<K, V>where - K: Sync, - V: Sync,

§

impl<K, V> Unpin for VecMap<K, V>where - K: Unpin, - V: Unpin,

§

impl<K, V> UnwindSafe for VecMap<K, V>where - K: UnwindSafe, - V: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

const: unstable · 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> ToOwned for Twhere - T: Clone,

§

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 Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
\ No newline at end of file