pub trait FetchableWithContext: SonosProperty {
type Operation: UPnPOperation;
// Required methods
fn build_operation( ) -> Result<ComposableOperation<Self::Operation>, SdkError>;
fn from_response_with_context(
response: <Self::Operation as UPnPOperation>::Response,
speaker_id: &SpeakerId,
) -> Option<Self>;
}Expand description
Trait for properties that require context (e.g., speaker_id) to interpret the response
Unlike Fetchable, the response contains data for multiple entities and
the correct one must be extracted using context.
Required Associated Types§
Sourcetype Operation: UPnPOperation
type Operation: UPnPOperation
The UPnP operation type used to fetch this property
Required Methods§
Sourcefn build_operation() -> Result<ComposableOperation<Self::Operation>, SdkError>
fn build_operation() -> Result<ComposableOperation<Self::Operation>, SdkError>
Build the operation to fetch this property
Sourcefn from_response_with_context(
response: <Self::Operation as UPnPOperation>::Response,
speaker_id: &SpeakerId,
) -> Option<Self>
fn from_response_with_context( response: <Self::Operation as UPnPOperation>::Response, speaker_id: &SpeakerId, ) -> Option<Self>
Convert the operation response to the property value using speaker context
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.