pub struct DVRIPCam { /* private fields */ }Implementations§
Source§impl DVRIPCam
impl DVRIPCam
Sourcepub fn new(ip: impl Into<String>) -> Self
pub fn new(ip: impl Into<String>) -> Self
Examples found in repository?
examples/device_upgrade.rs (line 16)
5async fn main() -> Result<(), Box<dyn std::error::Error>> {
6 let args: Vec<String> = std::env::args().collect();
7 if args.len() < 4 {
8 println!("Usage: {} <IP> <Username> <Password>", args[0]);
9 return Ok(());
10 }
11
12 let ip = &args[1];
13 let user = &args[2];
14 let pass = &args[3];
15
16 let mut cam = DVRIPCam::new(ip);
17
18 cam.connect(Duration::from_secs(5)).await?;
19 cam.login(user, pass).await?;
20
21 println!("Checking device upgrade compatibility...");
22 match cam.get_upgrade_info().await {
23 Ok(info) => println!("Upgrade Information: {:#?}", info),
24 Err(e) => eprintln!("Failed to get upgrade info: {}", e),
25 }
26
27 println!("\n--- FIRMWARE UPGRADE EXAMPLE ---");
28 println!("WARNING: This is a critical operation. Ensure you have the correct .bin file.");
29
30 cam.close().await?;
31 Ok(())
32}More examples
examples/alarm_remote_control.rs (line 16)
5async fn main() -> Result<(), Box<dyn std::error::Error>> {
6 let args: Vec<String> = std::env::args().collect();
7 if args.len() < 4 {
8 println!("Usage: {} <IP> <Username> <Password>", args[0]);
9 return Ok(());
10 }
11
12 let ip = &args[1];
13 let user = &args[2];
14 let pass = &args[3];
15
16 let mut cam = DVRIPCam::new(ip);
17
18 cam.connect(Duration::from_secs(5)).await?;
19 cam.login(user, pass).await?;
20
21 println!("Attempting to trigger the device's remote alarm/siren output...");
22
23 match cam.set_remote_alarm(true).await {
24 Ok(true) => println!("Alarm activated! Check your device."),
25 Ok(false) => println!("Command sent but device returned failure."),
26 Err(e) => eprintln!("Error sending command: {}", e),
27 }
28
29 println!("Waiting 5 seconds before deactivating...");
30 tokio::time::sleep(Duration::from_secs(5)).await;
31
32 println!("Deactivating alarm...");
33 let _ = cam.set_remote_alarm(false).await;
34
35 cam.close().await?;
36 println!("Done.");
37
38 Ok(())
39}examples/alarm_event_logging.rs (line 16)
5async fn main() -> Result<(), Box<dyn std::error::Error>> {
6 let args: Vec<String> = std::env::args().collect();
7 if args.len() < 4 {
8 println!("Usage: {} <IP> <Username> <Password>", args[0]);
9 return Ok(());
10 }
11
12 let ip = &args[1];
13 let user = &args[2];
14 let pass = &args[3];
15
16 let mut cam = DVRIPCam::new(ip);
17
18 println!("Connecting and logging in...");
19 cam.connect(Duration::from_secs(5)).await?;
20
21 if !cam.login(user, pass).await? {
22 println!("Login failed");
23 return Ok(());
24 }
25
26 println!("Starting alarm monitoring...");
27
28 let callback = Box::new(|data: serde_json::Value, count| {
29 let now = chrono::Local::now();
30 println!("\n[{}] EVENT #{}", now.format("%H:%M:%S"), count);
31
32 if let Some(obj) = data.as_object() {
33 for (key, value) in obj {
34 println!(" {}: {}", key, value);
35 }
36 } else {
37 println!(" Raw Data: {}", data);
38 }
39 });
40
41 cam.set_alarm_callback(Some(callback));
42 cam.start_alarm_monitoring().await?;
43
44 println!("Monitoring for 2 minutes. Press Ctrl+C to stop early.");
45 tokio::time::sleep(Duration::from_secs(120)).await;
46
47 println!("Stopping monitoring...");
48 cam.stop_alarm_monitoring().await?;
49 cam.close().await?;
50
51 Ok(())
52}examples/config_management.rs (line 16)
5async fn main() -> Result<(), Box<dyn std::error::Error>> {
6 let args: Vec<String> = std::env::args().collect();
7 if args.len() < 4 {
8 println!("Usage: {} <IP> <Username> <Password>", args[0]);
9 return Ok(());
10 }
11
12 let ip = &args[1];
13 let user = &args[2];
14 let pass = &args[3];
15
16 let mut cam = DVRIPCam::new(ip);
17
18 cam.connect(Duration::from_secs(5)).await?;
19 cam.login(user, pass).await?;
20
21 println!("--- CONFIGURATION MANAGEMENT ---");
22
23 // 1. Get Encoding Configuration
24 println!("Retrieving Encoding Config...");
25 match cam.get_encode_info(false).await {
26 Ok(config) => println!("Current Encode Settings: {:#?}", config),
27 Err(e) => eprintln!("Error: {}", e),
28 }
29
30 // 2. Get Camera Settings
31 println!("\nRetrieving Camera Settings...");
32 match cam.get_camera_info(false).await {
33 Ok(config) => println!("Current Camera Settings: {:#?}", config),
34 Err(e) => eprintln!("Error: {}", e),
35 }
36
37 // 3. Syncing device time
38 println!("\nSyncing device time with local system time...");
39 let now = chrono::Local::now();
40 match cam.set_time(Some(now)).await {
41 Ok(true) => println!("Time synchronized to: {}", now),
42 Ok(false) => println!("Failed to sync time."),
43 Err(e) => eprintln!("Error: {}", e),
44 }
45
46 cam.close().await?;
47 Ok(())
48}examples/account_management.rs (line 16)
5async fn main() -> Result<(), Box<dyn std::error::Error>> {
6 let args: Vec<String> = std::env::args().collect();
7 if args.len() < 4 {
8 println!("Usage: {} <IP> <Username> <Password>", args[0]);
9 return Ok(());
10 }
11
12 let ip = &args[1];
13 let user = &args[2];
14 let pass = &args[3];
15
16 let mut cam = DVRIPCam::new(ip);
17
18 cam.connect(Duration::from_secs(5)).await?;
19 cam.login(user, pass).await?;
20
21 println!("--- USER LIST ---");
22 match cam.get_users().await {
23 Ok(users) => {
24 for user in users {
25 let name = user
26 .get("Name")
27 .and_then(|n| n.as_str())
28 .unwrap_or("Unknown");
29 let group = user.get("Group").and_then(|g| g.as_str()).unwrap_or("None");
30 println!(" - User: {} [Group: {}]", name, group);
31 }
32 }
33 Err(e) => eprintln!("Failed to get users: {}", e),
34 }
35
36 println!("\n--- GROUP LIST ---");
37 match cam.get_groups().await {
38 Ok(groups) => {
39 for group in groups {
40 let name = group
41 .get("Name")
42 .and_then(|n| n.as_str())
43 .unwrap_or("Unknown");
44 println!(" - Group: {}", name);
45 }
46 }
47 Err(e) => eprintln!("Failed to get groups: {}", e),
48 }
49
50 cam.close().await?;
51 Ok(())
52}examples/ptz_control.rs (line 16)
5async fn main() -> Result<(), Box<dyn std::error::Error>> {
6 let args: Vec<String> = std::env::args().collect();
7 if args.len() < 4 {
8 println!("Usage: {} <IP> <Username> <Password>", args[0]);
9 return Ok(());
10 }
11
12 let ip = &args[1];
13 let user = &args[2];
14 let pass = &args[3];
15
16 let mut cam = DVRIPCam::new(ip);
17
18 cam.connect(Duration::from_secs(5)).await?;
19 cam.login(user, pass).await?;
20
21 println!("Performing PTZ operations...");
22
23 // 1. Step movement
24 println!("Stepping Left...");
25 cam.ptz_step(PTZCommand::DirectionLeft, 10).await?;
26 tokio::time::sleep(Duration::from_millis(500)).await;
27
28 println!("Stepping Right...");
29 cam.ptz_step(PTZCommand::DirectionRight, 10).await?;
30 tokio::time::sleep(Duration::from_millis(500)).await;
31
32 // 2. Continuous movement
33 println!("Starting continuous Up movement...");
34 cam.ptz(PTZCommand::DirectionUp, 3, -1, 0).await?;
35
36 tokio::time::sleep(Duration::from_secs(1)).await;
37
38 // 3. Zooming (using ptz_step which handles start/stop)
39 println!("Zooming Tile...");
40 cam.ptz_step(PTZCommand::ZoomTile, 4).await?;
41 tokio::time::sleep(Duration::from_secs(1)).await;
42 println!("Zooming Wide...");
43 cam.ptz_step(PTZCommand::ZoomWide, 4).await?;
44
45 // 4. Presets
46 println!("Moving to Preset 1...");
47 cam.ptz(PTZCommand::GotoPreset, 3, 1, 0).await?;
48
49 cam.close().await?;
50 println!("Done.");
51
52 Ok(())
53}Additional examples can be found in:
pub fn with_port(self, port: u16) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Trait Implementations§
Source§impl Alarm for DVRIPCam
impl Alarm for DVRIPCam
Source§fn set_alarm_callback(&mut self, callback: Option<AlarmCallback>)
fn set_alarm_callback(&mut self, callback: Option<AlarmCallback>)
Set the alarm callback function
Source§fn clear_alarm_callback(&mut self)
fn clear_alarm_callback(&mut self)
Clear the alarm callback
Source§fn start_alarm_monitoring<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_alarm_monitoring<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start alarm monitoring
Source§fn stop_alarm_monitoring<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop_alarm_monitoring<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop alarm monitoring
Source§fn set_remote_alarm<'life0, 'async_trait>(
&'life0 mut self,
state: bool,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_remote_alarm<'life0, 'async_trait>(
&'life0 mut self,
state: bool,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Set remote alarm
Source§fn is_alarm_monitoring(&self) -> bool
fn is_alarm_monitoring(&self) -> bool
Check if monitoring alarms
Source§impl Authentication for DVRIPCam
impl Authentication for DVRIPCam
Source§fn login<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn login<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
username: &'life1 str,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Login to the device
Source§fn logout<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn logout<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Logout from the device
Source§fn is_authenticated(&self) -> bool
fn is_authenticated(&self) -> bool
Check if authenticated
Source§fn session_id(&self) -> u32
fn session_id(&self) -> u32
Get the session ID
Source§fn change_password<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
old_password: &'life1 str,
new_password: &'life2 str,
username: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn change_password<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
old_password: &'life1 str,
new_password: &'life2 str,
username: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Change user password
Source§impl Connection for DVRIPCam
impl Connection for DVRIPCam
Source§fn connect<'life0, 'async_trait>(
&'life0 mut self,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 mut self,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Connect to the device
Source§fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Disconnect from the device
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Check if connected
Source§impl FileManagement for DVRIPCam
impl FileManagement for DVRIPCam
Source§fn list_local_files<'life0, 'life1, 'async_trait>(
&'life0 mut self,
start_time: DateTime<Local>,
end_time: DateTime<Local>,
file_type: &'life1 str,
channel: u8,
) -> Pin<Box<dyn Future<Output = Result<Vec<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_local_files<'life0, 'life1, 'async_trait>(
&'life0 mut self,
start_time: DateTime<Local>,
end_time: DateTime<Local>,
file_type: &'life1 str,
channel: u8,
) -> Pin<Box<dyn Future<Output = Result<Vec<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List local files on the device
Source§fn download_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
start_time: DateTime<Local>,
end_time: DateTime<Local>,
filename: &'life1 str,
target_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn download_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
start_time: DateTime<Local>,
end_time: DateTime<Local>,
filename: &'life1 str,
target_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Download a file from the device
Source§impl Monitoring for DVRIPCam
impl Monitoring for DVRIPCam
Source§fn start_monitor<'life0, 'life1, 'async_trait>(
&'life0 mut self,
callback: FrameCallback,
stream: &'life1 str,
channel: u8,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start_monitor<'life0, 'life1, 'async_trait>(
&'life0 mut self,
callback: FrameCallback,
stream: &'life1 str,
channel: u8,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Start video monitoring
Source§fn stop_monitor<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop_monitor<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop video monitoring
Source§fn snapshot<'life0, 'async_trait>(
&'life0 mut self,
channel: u8,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn snapshot<'life0, 'async_trait>(
&'life0 mut self,
channel: u8,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a snapshot (screenshot)
Source§fn is_monitoring(&self) -> bool
fn is_monitoring(&self) -> bool
Check if monitoring
Source§impl PTZ for DVRIPCam
impl PTZ for DVRIPCam
Source§fn ptz<'life0, 'async_trait>(
&'life0 mut self,
cmd: PTZCommand,
step: u8,
preset: i32,
channel: u8,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ptz<'life0, 'async_trait>(
&'life0 mut self,
cmd: PTZCommand,
step: u8,
preset: i32,
channel: u8,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Control PTZ with continuous command
Source§fn ptz_step<'life0, 'async_trait>(
&'life0 mut self,
cmd: PTZCommand,
step: u8,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ptz_step<'life0, 'async_trait>(
&'life0 mut self,
cmd: PTZCommand,
step: u8,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Control PTZ with single step movement
Source§fn key_down<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn key_down<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Press a key (keyDown)
Source§fn key_up<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn key_up<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Release a key (keyUp)
Source§impl SystemInfo for DVRIPCam
impl SystemInfo for DVRIPCam
Source§fn get_system_info<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_info<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get general system information
Source§fn get_general_info<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_general_info<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get general information
Source§fn get_network_info<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_network_info<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get network information
Source§fn get_encode_capabilities<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_encode_capabilities<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get encoding capabilities
Source§fn get_system_capabilities<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_capabilities<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get system capabilities
Source§fn get_camera_info<'life0, 'async_trait>(
&'life0 mut self,
default_config: bool,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_camera_info<'life0, 'async_trait>(
&'life0 mut self,
default_config: bool,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get camera information
Source§fn get_encode_info<'life0, 'async_trait>(
&'life0 mut self,
default_config: bool,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_encode_info<'life0, 'async_trait>(
&'life0 mut self,
default_config: bool,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get encoding information
Source§fn get_time<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<DateTime<Local>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_time<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<DateTime<Local>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get current device time
Source§fn set_time<'life0, 'async_trait>(
&'life0 mut self,
time: Option<DateTime<Local>>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_time<'life0, 'async_trait>(
&'life0 mut self,
time: Option<DateTime<Local>>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Set device time
Source§fn get_channel_titles<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_channel_titles<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get channel titles
Source§impl Upgrade for DVRIPCam
impl Upgrade for DVRIPCam
Source§fn get_upgrade_info<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_upgrade_info<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get upgrade information
Source§fn upgrade<'life0, 'life1, 'async_trait>(
&'life0 mut self,
filename: &'life1 str,
packet_size: usize,
progress_callback: Option<UpgradeProgressCallback>,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upgrade<'life0, 'life1, 'async_trait>(
&'life0 mut self,
filename: &'life1 str,
packet_size: usize,
progress_callback: Option<UpgradeProgressCallback>,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Perform system upgrade
Source§impl UserManagement for DVRIPCam
impl UserManagement for DVRIPCam
Get the list of authorities
Source§fn get_groups<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_groups<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the list of groups
Source§fn add_group<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
comment: &'life2 str,
auth: Option<Vec<Value>>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_group<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
comment: &'life2 str,
auth: Option<Vec<Value>>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Add a new group
Source§fn modify_group<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
newname: Option<&'life2 str>,
comment: Option<&'life3 str>,
auth: Option<Vec<Value>>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn modify_group<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
newname: Option<&'life2 str>,
comment: Option<&'life3 str>,
auth: Option<Vec<Value>>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Modify an existing group
Source§fn delete_group<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_group<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a group
Source§fn get_users<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_users<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the list of users
Source§fn add_user<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
password: &'life2 str,
comment: &'life3 str,
group: &'life4 str,
auth: Option<Vec<Value>>,
sharable: bool,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn add_user<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
password: &'life2 str,
comment: &'life3 str,
group: &'life4 str,
auth: Option<Vec<Value>>,
sharable: bool,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Add a new user
Source§fn modify_user<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
newname: Option<&'life2 str>,
comment: Option<&'life3 str>,
group: Option<&'life4 str>,
auth: Option<Vec<Value>>,
sharable: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn modify_user<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
newname: Option<&'life2 str>,
comment: Option<&'life3 str>,
group: Option<&'life4 str>,
auth: Option<Vec<Value>>,
sharable: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Modify an existing user
Auto Trait Implementations§
impl Freeze for DVRIPCam
impl !RefUnwindSafe for DVRIPCam
impl Send for DVRIPCam
impl Sync for DVRIPCam
impl Unpin for DVRIPCam
impl !UnwindSafe for DVRIPCam
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