pub struct VportState { /* private fields */ }
Expand description
Tracks vport state and optionally notifies a listener of changes.
Implementations§
Source§impl VportState
impl VportState
Sourcepub fn new(
direction_to_vtl0: Option<bool>,
state_change_callback: Option<Box<dyn Fn(bool) + Send + Sync>>,
) -> Self
pub fn new( direction_to_vtl0: Option<bool>, state_change_callback: Option<Box<dyn Fn(bool) + Send + Sync>>, ) -> Self
Create a new VportState instance.
Sourcepub fn set_direction_to_vtl0(&self, direction_to_vtl0: bool)
pub fn set_direction_to_vtl0(&self, direction_to_vtl0: bool)
Remember current filter setting.
Sourcepub fn get_direction_to_vtl0(&self) -> Option<bool>
pub fn get_direction_to_vtl0(&self) -> Option<bool>
Get current filter setting if known.
Trait Implementations§
Source§impl Clone for VportState
impl Clone for VportState
Source§fn clone(&self) -> VportState
fn clone(&self) -> VportState
Returns a copy 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 VportState
impl !RefUnwindSafe for VportState
impl Send for VportState
impl Sync for VportState
impl Unpin for VportState
impl !UnwindSafe for VportState
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