pub enum UpdateResult<'a, S> {
NoChange,
Existing {
properties: &'a Properties,
state: &'a mut S,
},
Added {
properties: &'a Properties,
state: &'a mut S,
},
Changed {
previous: Properties,
current: &'a Properties,
state: &'a mut S,
},
Removed(PropertiesAndState<S>),
}
Expand description
The result of updating network interface state with an event.
Variants§
NoChange
The update did not change the local state.
Existing
The update inserted an existing interface into the local state.
Added
The update inserted an added interface into the local state.
Changed
The update changed an existing interface in the local state.
Fields
§
previous: Properties
The previous values of any properties which changed.
This is sparsely populated: none of the immutable properties are present (they can
all be found on current
), and a mutable property is present with its value pre-update
iff it has changed as a result of the update.
§
current: &'a Properties
The properties of the interface post-update.
Removed(PropertiesAndState<S>)
The update removed an interface from the local state.
Trait Implementations§
source§impl<'a, S: Debug> Debug for UpdateResult<'a, S>
impl<'a, S: Debug> Debug for UpdateResult<'a, S>
source§impl<'a, S: PartialEq> PartialEq for UpdateResult<'a, S>
impl<'a, S: PartialEq> PartialEq for UpdateResult<'a, S>
source§fn eq(&self, other: &UpdateResult<'a, S>) -> bool
fn eq(&self, other: &UpdateResult<'a, S>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a, S> StructuralPartialEq for UpdateResult<'a, S>
Auto Trait Implementations§
impl<'a, S> Freeze for UpdateResult<'a, S>where
S: Freeze,
impl<'a, S> RefUnwindSafe for UpdateResult<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for UpdateResult<'a, S>where
S: Send,
impl<'a, S> Sync for UpdateResult<'a, S>where
S: Sync,
impl<'a, S> Unpin for UpdateResult<'a, S>where
S: Unpin,
impl<'a, S> !UnwindSafe for UpdateResult<'a, S>
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