pub struct Camera {
pub name: String,
pub host: String,
pub port: u16,
pub username: Option<String>,
pub password: Option<String>,
pub protocol: Protocol,
pub transport: Transport,
pub stream: StreamType,
pub custom_path: Option<String>,
pub audio_enabled: bool,
pub auth_method: AuthMethod,
pub timeout: Duration,
}Expand description
Runtime representation of a connected camera
Fields§
§name: StringCamera name/identifier
host: StringHostname or IP address
port: u16RTSP port
username: Option<String>Username for authentication
password: Option<String>Password for authentication
protocol: ProtocolRTSP protocol (rtsp or rtsps)
transport: TransportNetwork transport (tcp or udp)
stream: StreamTypeStream type (main, sub, or custom)
custom_path: Option<String>Custom stream path override
audio_enabled: boolWhether to enable audio in the stream
auth_method: AuthMethodAuthentication method
timeout: DurationConnection timeout
Implementations§
Source§impl Camera
impl Camera
Sourcepub fn from_config(config: &CameraConfig) -> Self
pub fn from_config(config: &CameraConfig) -> Self
Sourcepub fn rtsp_url(&self) -> String
pub fn rtsp_url(&self) -> String
Build the full RTSP URL with credentials
§Returns
A complete RTSP URL string in the format:
rtsp://[username:password@]host:port/path
Sourcepub fn rtsp_url_redacted(&self) -> String
pub fn rtsp_url_redacted(&self) -> String
Build the RTSP URL with password redacted
§Returns
An RTSP URL string with the password replaced by asterisks
Sourcepub fn stream_path(&self) -> &str
pub fn stream_path(&self) -> &str
Sourcepub fn display_name(&self) -> &str
pub fn display_name(&self) -> &str
Trait Implementations§
impl Eq for Camera
impl StructuralPartialEq for Camera
Auto Trait Implementations§
impl Freeze for Camera
impl RefUnwindSafe for Camera
impl Send for Camera
impl Sync for Camera
impl Unpin for Camera
impl UnsafeUnpin for Camera
impl UnwindSafe for Camera
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().