pub struct AnyChannel { /* private fields */ }Expand description
A telemetry channel descriptor after erasing its Rust marker type.
Framework code needs a uniform representation because a plugin can
subscribe to channels carrying many different SDK value types. Erasure does
not discard the ABI type discriminator: AnyChannel::value_type remains
available and callback values must still carry that exact tag before typed
decoding succeeds.
Application plugins normally construct this value through
Channel::erase rather than directly.
Implementations§
Source§impl AnyChannel
impl AnyChannel
Sourcepub const fn name(self) -> &'static CStr
pub const fn name(self) -> &'static CStr
Returns the canonical, NUL-terminated channel name from the SDK header.
Sourcepub const fn value_type(self) -> ValueType
pub const fn value_type(self) -> ValueType
Returns the concrete tagged-union member requested during registration.
Sourcepub const fn is_indexed(self) -> bool
pub const fn is_indexed(self) -> bool
Whether the channel requires a separate zero-based SDK index.
This index is used for arrays such as wheels. It is distinct from the trailer number embedded in a multi-trailer channel name.
Sourcepub const fn availability(self) -> GameSchemaAvailability
pub const fn availability(self) -> GameSchemaAvailability
Returns the official per-game schema history for this channel.
Type erasure retains availability so framework code can reject a required channel, or skip an optional channel, before asking an older game schema to register a name it cannot expose.
Trait Implementations§
Source§impl Clone for AnyChannel
impl Clone for AnyChannel
Source§fn clone(&self) -> AnyChannel
fn clone(&self) -> AnyChannel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more