pub enum Direction {
SendOnly,
RecvOnly,
SendRecv,
Inactive,
}
Expand description
Media direction.
And also extmap direction.
Variants§
SendOnly
Send only direction.
RecvOnly
Receive only direction.
SendRecv
Bi-directional.
Inactive
Disabled direction.
Implementations§
Source§impl Direction
impl Direction
Sourcepub fn invert(&self) -> Self
pub fn invert(&self) -> Self
Change the direction to the opposite.
SendRecv
and Inactive
are left unchanged.
Sourcepub fn is_sending(&self) -> bool
pub fn is_sending(&self) -> bool
Whether this direction is a sending direction.
Sourcepub fn is_receiving(&self) -> bool
pub fn is_receiving(&self) -> bool
Whether this direction is a receiving direction.
Trait Implementations§
impl Copy for Direction
impl Eq for Direction
impl StructuralPartialEq for Direction
Auto Trait Implementations§
impl Freeze for Direction
impl RefUnwindSafe for Direction
impl Send for Direction
impl Sync for Direction
impl Unpin for Direction
impl UnwindSafe for Direction
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