pub struct CandidateAddress {
pub address: SocketAddr,
pub priority: u32,
pub source: CandidateSource,
pub state: CandidateState,
}
Expand description
Address candidate discovered during NAT traversal
Fields§
§address: SocketAddr
The candidate address
priority: u32
Priority for ICE-like selection
source: CandidateSource
How this candidate was discovered
state: CandidateState
Current validation state
Implementations§
Source§impl CandidateAddress
impl CandidateAddress
Sourcepub fn new(
address: SocketAddr,
priority: u32,
source: CandidateSource,
) -> Result<Self, CandidateValidationError>
pub fn new( address: SocketAddr, priority: u32, source: CandidateSource, ) -> Result<Self, CandidateValidationError>
Create a new candidate address with validation
Sourcepub fn validate_address(
addr: &SocketAddr,
) -> Result<(), CandidateValidationError>
pub fn validate_address( addr: &SocketAddr, ) -> Result<(), CandidateValidationError>
Validate a candidate address for security and correctness
Sourcepub fn is_suitable_for_nat_traversal(&self) -> bool
pub fn is_suitable_for_nat_traversal(&self) -> bool
Check if this candidate is suitable for NAT traversal
Sourcepub fn effective_priority(&self) -> u32
pub fn effective_priority(&self) -> u32
Get the priority adjusted for the current state
Trait Implementations§
Source§impl Clone for CandidateAddress
impl Clone for CandidateAddress
Source§fn clone(&self) -> CandidateAddress
fn clone(&self) -> CandidateAddress
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CandidateAddress
impl RefUnwindSafe for CandidateAddress
impl Send for CandidateAddress
impl Sync for CandidateAddress
impl Unpin for CandidateAddress
impl UnwindSafe for CandidateAddress
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