pub struct Channel<T> { /* private fields */ }Implementations§
Source§impl<T: ChannelValue> Channel<T>
impl<T: ChannelValue> Channel<T>
pub const fn new( name: &'static CStr, availability: GameSchemaAvailability, ) -> Self
Sourcepub const fn indexed(
name: &'static CStr,
availability: GameSchemaAvailability,
) -> Self
pub const fn indexed( name: &'static CStr, availability: GameSchemaAvailability, ) -> Self
Creates a descriptor whose values are selected through the SDK index
parameter, such as individual wheel or H-shifter selector channels.
pub const fn name(self) -> &'static CStr
pub const fn value_type(self) -> ScsValueType
Sourcepub const fn is_indexed(self) -> bool
pub const fn is_indexed(self) -> bool
Whether registration requires an explicit zero-based SDK index.
Sourcepub const fn availability(self) -> GameSchemaAvailability
pub const fn availability(self) -> GameSchemaAvailability
Returns the first official ETS2 and ATS schemas for this channel.
Sourcepub const fn requesting<U: ChannelValue>(self) -> Channel<U>
pub const fn requesting<U: ChannelValue>(self) -> Channel<U>
Requests the same channel using another SDK value representation.
SCS performs the authoritative compatibility check during registration
and reports SCS_RESULT_unsupported_type when conversion is unavailable.
Sourcepub const fn erase(self) -> AnyChannel
pub const fn erase(self) -> AnyChannel
Erases the Rust marker type while preserving the SDK value discriminator.
This is the representation used by the plugin framework’s heterogeneous subscription table. A value can later be decoded with the original typed descriptor only when the names, index mode, and value types match.