#[repr(C)]pub struct Component<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Component<'a>
impl<'a> Component<'a>
Sourcepub fn state(&self) -> ComponentConnectionState
pub fn state(&self) -> ComponentConnectionState
Retrieve the current state of a Component
§Examples
The initial state is ComponentState::New
let mut agent = Agent::default();
let stream_id = agent.add_stream();
let mut stream = agent.mut_stream(stream_id).unwrap();
let component_id = stream.add_component().unwrap();
let component = stream.component(component_id).unwrap();
assert_eq!(component.state(), ComponentConnectionState::New);
Sourcepub fn selected_pair(&self) -> Option<&CandidatePair>
pub fn selected_pair(&self) -> Option<&CandidatePair>
The CandidatePair
this component has selected to send/receive data with. This will not
be valid until the Component
has reached ComponentConnectionState::Connected
Auto Trait Implementations§
impl<'a> Freeze for Component<'a>
impl<'a> !RefUnwindSafe for Component<'a>
impl<'a> Send for Component<'a>
impl<'a> Sync for Component<'a>
impl<'a> Unpin for Component<'a>
impl<'a> !UnwindSafe for Component<'a>
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