pub struct DeviceSite {
pub symbol: Symbol,
pub profile: DeviceProfile,
pub surface_codec_id: Symbol,
pub locality: DeviceSiteLocality,
}Expand description
Export-record-style descriptor for a stream device site.
Fields§
§symbol: SymbolStable site symbol exported by the provider.
profile: DeviceProfileDevice profile carried by this site export.
surface_codec_id: SymbolSurface codec used to encode device samples and commands.
locality: DeviceSiteLocalityLocality used by placement validation.
Implementations§
Source§impl DeviceSite
impl DeviceSite
Sourcepub fn new(
symbol: Symbol,
profile: DeviceProfile,
surface_codec_id: Symbol,
locality: DeviceSiteLocality,
) -> Self
pub fn new( symbol: Symbol, profile: DeviceProfile, surface_codec_id: Symbol, locality: DeviceSiteLocality, ) -> Self
Builds a device site descriptor.
Sourcepub fn edge_local(
symbol: Symbol,
profile: DeviceProfile,
surface_codec_id: Symbol,
) -> Self
pub fn edge_local( symbol: Symbol, profile: DeviceProfile, surface_codec_id: Symbol, ) -> Self
Builds a device or edge-local site descriptor.
Sourcepub fn host_local(
symbol: Symbol,
profile: DeviceProfile,
surface_codec_id: Symbol,
) -> Self
pub fn host_local( symbol: Symbol, profile: DeviceProfile, surface_codec_id: Symbol, ) -> Self
Builds a host-local site descriptor.
Sourcepub fn remote(
symbol: Symbol,
profile: DeviceProfile,
surface_codec_id: Symbol,
) -> Self
pub fn remote( symbol: Symbol, profile: DeviceProfile, surface_codec_id: Symbol, ) -> Self
Builds a remote site descriptor.
Sourcepub fn is_edge_local(&self) -> bool
pub fn is_edge_local(&self) -> bool
Returns whether this site is local enough for a latency-critical adapter.
Sourcepub fn require_edge_local(&self) -> DeviceResult<()>
pub fn require_edge_local(&self) -> DeviceResult<()>
Checks that this site is local enough for a latency-critical adapter.
Trait Implementations§
Source§impl Clone for DeviceSite
impl Clone for DeviceSite
Source§fn clone(&self) -> DeviceSite
fn clone(&self) -> DeviceSite
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceSite
impl Debug for DeviceSite
impl Eq for DeviceSite
Source§impl PartialEq for DeviceSite
impl PartialEq for DeviceSite
impl StructuralPartialEq for DeviceSite
Auto Trait Implementations§
impl Freeze for DeviceSite
impl RefUnwindSafe for DeviceSite
impl Send for DeviceSite
impl Sync for DeviceSite
impl Unpin for DeviceSite
impl UnsafeUnpin for DeviceSite
impl UnwindSafe for DeviceSite
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more