configuration
Generated Rust API reference for byte_engine.
Module configuration
Asynchronous configuration messages used by debugging adapters and engine systems.
Create a Configuration, register one ConfigurationPort for each owned
parameter prefix, then submit updates with Configuration::update. The
consuming system keeps each update pending until it can report either
ConfigurationUpdateState::Set or ConfigurationUpdateState::NotSet.
Quick Reference
| Item | Kind | Description |
|---|---|---|
ConfigurationEventId | struct | The ConfigurationEventId struct identifies one configuration update from submission through application. |
ConfigurationEvent | struct | The ConfigurationEvent struct provides the requested value and latest application state for debugging tools. |
ConfigurationUpdate | struct | The ConfigurationUpdate struct transfers one requested value to the system that owns its parameter prefix. |
Configuration | struct | The Configuration struct routes configuration messages while retaining their latest state for debugging tools. |
ConfigurationPort | struct | The ConfigurationPort struct gives one consuming system an update queue and result-reporting handle. |
ConfigurationValue | enum | The ConfigurationValue enum carries the small set of values shared by configuration adapters and systems. |
ConfigurationUpdateState | enum | The ConfigurationUpdateState enum reports the current application result for one configuration event. |
Structs
ConfigurationEventId
struct ConfigurationEventId();Defined in crates/byte-engine/src/configuration.rs:24
The ConfigurationEventId struct identifies one configuration update from submission through application.
Trait Implementations
impl ArchivePointee for ConfigurationEventId
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for ConfigurationEventId
impl Clone for ConfigurationEventId
-
fn clone(&self) -> ConfigurationEventIdRelated:
ConfigurationEventId
impl Copy for ConfigurationEventId
impl Debug for ConfigurationEventId
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for ConfigurationEventId
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for ConfigurationEventId
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for ConfigurationEventId
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for ConfigurationEventId
impl<K> Equivalent for ConfigurationEventId
-
fn equivalent(&self, key: &K) -> bool
impl Hash for ConfigurationEventId
-
fn hash<__H: hash::Hasher>(&self, state: &mut __H)
impl Instrument for ConfigurationEventId
impl LayoutRaw for ConfigurationEventId
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for ConfigurationEventId
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for ConfigurationEventId
-
fn eq(&self, other: &ConfigurationEventId) -> boolRelated:
ConfigurationEventId
impl Pointable for ConfigurationEventId
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for ConfigurationEventId
-
type Metadata = ()
impl Read for ConfigurationEventId
impl Serialize for ConfigurationEventId
-
fn serialize<__S>(&self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
impl StructuralPartialEq for ConfigurationEventId
impl WithSubscriber for ConfigurationEventId
ConfigurationEvent
struct ConfigurationEvent {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/configuration.rs:82-87
The ConfigurationEvent struct provides the requested value and latest application state for debugging tools.
Implementations
-
fn id(&self) -> ConfigurationEventIdRelated:
ConfigurationEventIdReturns the identifier assigned when this update was submitted.
-
fn parameter(&self) -> &strReturns the discoverable parameter name.
-
fn requested(&self) -> &ConfigurationValueRelated:
ConfigurationValueReturns the value requested by the producer.
-
fn state(&self) -> &ConfigurationUpdateStateRelated:
ConfigurationUpdateStateReturns the latest state reported by the owning system.
Trait Implementations
impl ArchivePointee for ConfigurationEvent
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for ConfigurationEvent
impl Clone for ConfigurationEvent
-
fn clone(&self) -> ConfigurationEventRelated:
ConfigurationEvent
impl Debug for ConfigurationEvent
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for ConfigurationEvent
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for ConfigurationEvent
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for ConfigurationEvent
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Instrument for ConfigurationEvent
impl LayoutRaw for ConfigurationEvent
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for ConfigurationEvent
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for ConfigurationEvent
-
fn eq(&self, other: &ConfigurationEvent) -> boolRelated:
ConfigurationEvent
impl Pointable for ConfigurationEvent
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for ConfigurationEvent
-
type Metadata = ()
impl Read for ConfigurationEvent
impl Serialize for ConfigurationEvent
-
fn serialize<__S>(&self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
impl StructuralPartialEq for ConfigurationEvent
impl WithSubscriber for ConfigurationEvent
ConfigurationUpdate
struct ConfigurationUpdate {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/configuration.rs:113-117
The ConfigurationUpdate struct transfers one requested value to the system that owns its parameter prefix.
Implementations
-
fn id(&self) -> ConfigurationEventIdRelated:
ConfigurationEventIdReturns the event identifier used to report the application result.
-
fn parameter(&self) -> &strReturns the parameter name routed to this system.
-
fn value(&self) -> &ConfigurationValueRelated:
ConfigurationValueReturns the requested parameter value.
Trait Implementations
impl ArchivePointee for ConfigurationUpdate
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for ConfigurationUpdate
impl Clone for ConfigurationUpdate
-
fn clone(&self) -> ConfigurationUpdateRelated:
ConfigurationUpdate
impl Debug for ConfigurationUpdate
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for ConfigurationUpdate
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for ConfigurationUpdate
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for ConfigurationUpdate
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Instrument for ConfigurationUpdate
impl LayoutRaw for ConfigurationUpdate
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for ConfigurationUpdate
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for ConfigurationUpdate
-
fn eq(&self, other: &ConfigurationUpdate) -> boolRelated:
ConfigurationUpdate
impl Pointable for ConfigurationUpdate
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for ConfigurationUpdate
-
type Metadata = ()
impl Read for ConfigurationUpdate
impl StructuralPartialEq for ConfigurationUpdate
impl WithSubscriber for ConfigurationUpdate
Configuration
struct Configuration {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/configuration.rs:149-151
The Configuration struct routes configuration messages while retaining their latest state for debugging tools.
Implementations
-
fn new() -> SelfCreates an empty configuration exchange.
Next, call
Self::registerbefore submitting matching updates throughSelf::update. -
fn register(&self, prefix: &str) -> ConfigurationPortRelated:
ConfigurationPortRegisters the system that owns parameters beginning with
prefix.Next, keep the returned port with that system and call
ConfigurationPort::readwhen the system is ready to queue updates. -
fn update(&self, parameter: impl Into<String>, value: impl Into<ConfigurationValue>) -> ConfigurationEventIdRelated:
ConfigurationValue,ConfigurationEventIdQueues a value for the system that owns the longest matching parameter prefix.
The returned event starts as pending. Use
Self::eventto inspect thesystem-reported result later.
-
fn event(&self, id: ConfigurationEventId) -> Option<ConfigurationEvent>Related:
ConfigurationEventId,ConfigurationEventReturns the latest state for one configuration event.
-
fn events(&self) -> Vec<ConfigurationEvent>Related:
ConfigurationEventReturns a snapshot of all retained configuration events.
Trait Implementations
impl ArchivePointee for Configuration
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for Configuration
impl Clone for Configuration
-
fn clone(&self) -> ConfigurationRelated:
Configuration
impl Default for Configuration
-
fn default() -> Self
impl Downcast for Configuration
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for Configuration
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for Configuration
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Instrument for Configuration
impl LayoutRaw for Configuration
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Configuration
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointable for Configuration
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for Configuration
-
type Metadata = ()
impl Read for Configuration
impl<R> ReadPrimitive for Configuration
impl WithSubscriber for Configuration
ConfigurationPort
struct ConfigurationPort {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/configuration.rs:258-261
The ConfigurationPort struct gives one consuming system an update queue and result-reporting handle.
Implementations
-
fn read(&self) -> Option<ConfigurationUpdate>Related:
ConfigurationUpdateReturns the next queued update without waiting for a producer.
-
fn set(&self, id: ConfigurationEventId, value: ConfigurationValue)Related:
ConfigurationEventId,ConfigurationValueReports the effective value applied by the consuming system.
-
fn not_set(&self, id: ConfigurationEventId, reason: impl Into<String>)Related:
ConfigurationEventIdReports why the consuming system did not apply the requested value.
Trait Implementations
impl ArchivePointee for ConfigurationPort
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for ConfigurationPort
impl Downcast for ConfigurationPort
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for ConfigurationPort
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl Instrument for ConfigurationPort
impl LayoutRaw for ConfigurationPort
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for ConfigurationPort
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointable for ConfigurationPort
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for ConfigurationPort
-
type Metadata = ()
impl Read for ConfigurationPort
impl WithSubscriber for ConfigurationPort
Enums
ConfigurationValue
enum ConfigurationValue {
Bool(bool),
Integer(i64),
Float(f64),
Text(String),
}Defined in crates/byte-engine/src/configuration.rs:29-38
The ConfigurationValue enum carries the small set of values shared by configuration adapters and systems.
Variants
-
BoolA Boolean configuration value.
-
IntegerA signed integer configuration value.
-
FloatA floating-point configuration value.
-
TextAn owned text configuration value.
Implementations
-
fn as_text(&self) -> Option<&str>Returns the text value expected by string-backed configuration consumers.
Trait Implementations
impl ArchivePointee for ConfigurationValue
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for ConfigurationValue
impl Clone for ConfigurationValue
-
fn clone(&self) -> ConfigurationValueRelated:
ConfigurationValue
impl Debug for ConfigurationValue
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for ConfigurationValue
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for ConfigurationValue
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for ConfigurationValue
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Instrument for ConfigurationValue
impl LayoutRaw for ConfigurationValue
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for ConfigurationValue
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for ConfigurationValue
-
fn eq(&self, other: &ConfigurationValue) -> boolRelated:
ConfigurationValue
impl Pointable for ConfigurationValue
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for ConfigurationValue
-
type Metadata = ()
impl Read for ConfigurationValue
impl Serialize for ConfigurationValue
-
fn serialize<__S>(&self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
impl StructuralPartialEq for ConfigurationValue
impl WithSubscriber for ConfigurationValue
ConfigurationUpdateState
enum ConfigurationUpdateState {
Pending,
Set {
value: ConfigurationValue,
},
NotSet {
reason: String,
},
}Defined in crates/byte-engine/src/configuration.rs:65-78
The ConfigurationUpdateState enum reports the current application result for one configuration event.
Variants
-
PendingThe owning system has not processed the update yet.
-
SetThe owning system applied the update.
-
NotSetThe owning system rejected or could not apply the update.
Trait Implementations
impl ArchivePointee for ConfigurationUpdateState
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for ConfigurationUpdateState
impl Clone for ConfigurationUpdateState
-
fn clone(&self) -> ConfigurationUpdateStateRelated:
ConfigurationUpdateState
impl Debug for ConfigurationUpdateState
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for ConfigurationUpdateState
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for ConfigurationUpdateState
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for ConfigurationUpdateState
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Instrument for ConfigurationUpdateState
impl LayoutRaw for ConfigurationUpdateState
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for ConfigurationUpdateState
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for ConfigurationUpdateState
-
fn eq(&self, other: &ConfigurationUpdateState) -> boolRelated:
ConfigurationUpdateState
impl Pointable for ConfigurationUpdateState
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for ConfigurationUpdateState
-
type Metadata = ()
impl Read for ConfigurationUpdateState
impl Serialize for ConfigurationUpdateState
-
fn serialize<__S>(&self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>