pub struct ConfigurationEvent<'a> { /* private fields */ }Expand description
High-level view over one SDK configuration event.
This wrapper keeps the exact zero-allocation typed decoder in scs-sdk
while adding Rust-text accessors for product plugins. All borrowed data is
still restricted to the current callback.
Implementations§
Source§impl<'a> ConfigurationEvent<'a>
impl<'a> ConfigurationEvent<'a>
Sourcepub fn is(self, id: ConfigurationId) -> bool
pub fn is(self, id: ConfigurationId) -> bool
Tests the event against a typed SDK configuration identifier.
Sourcepub fn trailer(self) -> Option<TrailerConfigurationId>
pub fn trailer(self) -> Option<TrailerConfigurationId>
Classifies the legacy or numbered trailer configuration identity.
Sourcepub fn trailer_index(self) -> Option<TrailerIndex>
pub fn trailer_index(self) -> Option<TrailerIndex>
Returns the numbered trailer index, excluding the legacy alias.
Sourcepub fn is_legacy_trailer(self) -> bool
pub fn is_legacy_trailer(self) -> bool
Whether this is the legacy unnumbered trailer configuration.
Sourcepub fn has_attributes(self) -> bool
pub fn has_attributes(self) -> bool
Whether the event contains at least one attribute.
SCS sends an empty job configuration when the active job disappears.
Sourcepub fn get<T: SdkValue>(self, attribute: Attribute<T>) -> Option<T::Decoded<'a>>
pub fn get<T: SdkValue>(self, attribute: Attribute<T>) -> Option<T::Decoded<'a>>
Decodes a scalar typed attribute.
Sourcepub fn get_at<T: SdkValue>(
self,
attribute: Attribute<T>,
index: SdkIndex,
) -> Option<T::Decoded<'a>>
pub fn get_at<T: SdkValue>( self, attribute: Attribute<T>, index: SdkIndex, ) -> Option<T::Decoded<'a>>
Decodes one member of an indexed typed attribute.
Sourcepub fn string(self, attribute: Attribute<StringValue>) -> Option<Cow<'a, str>>
pub fn string(self, attribute: Attribute<StringValue>) -> Option<Cow<'a, str>>
Decodes a string attribute as callback-lifetime Rust text.
Sourcepub fn string_owned(self, attribute: Attribute<StringValue>) -> Option<String>
pub fn string_owned(self, attribute: Attribute<StringValue>) -> Option<String>
Copies a string attribute for storage beyond the current callback.
Sourcepub fn shifter_type(self) -> Option<ShifterType>
pub fn shifter_type(self) -> Option<ShifterType>
Decodes the documented controls shifter type as a Rust enum.
None covers an absent attribute and a future string which SDK 1.14 did
not document. Call ConfigurationEvent::string with
sdk::configuration::attributes::SHIFTER_TYPE when the original
unknown text must be retained for forward-compatible diagnostics.
Sourcepub fn job_market(self) -> Option<JobMarket>
pub fn job_market(self) -> Option<JobMarket>
Decodes the documented active-job market as a Rust enum.
Unknown future values remain accessible through the generic string accessor instead of being reclassified as one of the known SDK 1.14 variants.
Trait Implementations§
Source§impl<'a> Clone for ConfigurationEvent<'a>
impl<'a> Clone for ConfigurationEvent<'a>
Source§fn clone(&self) -> ConfigurationEvent<'a>
fn clone(&self) -> ConfigurationEvent<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more