pub trait DeviceService:
Send
+ Sync
+ 'static {
// Provided methods
fn get_system_date_and_time<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DateTime<Utc>, OnvifError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_device_information<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DeviceInfo, OnvifError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_scopes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Scope>, OnvifError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_hostname<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HostnameInformation, OnvifError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_network_interfaces<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NetworkInterface>, OnvifError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
ONVIF Device Management Service (Profile S core).
All methods default to sensible values or not_implemented() — implementors
override only the operations their device supports. Trait is object-safe:
store as Arc<dyn DeviceService>.
NOTE: GetCapabilities and GetServices are framework-level — the handler constructs those internally from the bound xaddr. Do NOT add them to this trait.
Provided Methods§
Sourcefn get_system_date_and_time<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DateTime<Utc>, OnvifError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_date_and_time<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DateTime<Utc>, OnvifError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the current UTC time. Defaults to chrono::Utc::now().
Sourcefn get_device_information<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DeviceInfo, OnvifError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_device_information<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DeviceInfo, OnvifError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns manufacturer, model, firmware version, serial number, hardware ID.
Sourcefn get_scopes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Scope>, OnvifError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_scopes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Scope>, OnvifError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the scopes used for WS-Discovery advertisement.
Sourcefn get_hostname<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HostnameInformation, OnvifError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_hostname<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HostnameInformation, OnvifError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the hostname of the device.
Sourcefn get_network_interfaces<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NetworkInterface>, OnvifError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_network_interfaces<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NetworkInterface>, OnvifError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns network interface configurations.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".