pub struct DeviceDefinition {
pub id: DeviceId,
pub description: String,
pub transport: StationTransportRequirement,
pub signaling_qos: Option<SignalingQos>,
pub buttons: Vec<ButtonDefinition>,
pub soft_keys: SoftKeyProfile,
pub ui: StationUiPolicy,
}Expand description
Complete phone-facing configuration for one station.
Call Self::validate before starting or reconfiguring a server. A valid
definition has at least one line, unique nonzero button instances, a
complete soft-key profile, and no more physical buttons than the protocol
can advertise.
Fields§
§id: DeviceId§description: String§transport: StationTransportRequirement§signaling_qos: Option<SignalingQos>Socket marking selected after this station identifies itself. None
inherits the server-wide signaling policy.
Physical station buttons in display order.
Line instances remain protocol-level identifiers carried by
LineAppearance; they are not inferred from the vector index once
non-line buttons are present.
soft_keys: SoftKeyProfileFully resolved station soft-key policy.
ui: StationUiPolicyPer-station presentation behavior that belongs at the phone boundary.
Implementations§
Source§impl DeviceDefinition
impl DeviceDefinition
Sourcepub fn validate(&self) -> Result<(), CodecError>
pub fn validate(&self) -> Result<(), CodecError>
Validates the station definition and its nested button/service policies.
pub fn lines(&self) -> impl Iterator<Item = &LineAppearance>
pub fn line(&self, instance: u32) -> Option<&LineAppearance>
pub fn first_line(&self) -> Option<&LineAppearance>
pub fn line_count(&self) -> usize
Trait Implementations§
Source§impl Clone for DeviceDefinition
impl Clone for DeviceDefinition
Source§fn clone(&self) -> DeviceDefinition
fn clone(&self) -> DeviceDefinition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more