pub enum UpdateResult<'a, S, I: FieldInterests> {
NoChange,
Existing {
properties: &'a Properties<I>,
state: &'a mut S,
},
Added {
properties: &'a Properties<I>,
state: &'a mut S,
},
Changed {
previous: Properties,
current: &'a Properties<I>,
state: &'a mut S,
},
Removed(PropertiesAndState<S, I>),
}
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<I>
The properties of the interface post-update.
Removed(PropertiesAndState<S, I>)
The update removed an interface from the local state.
Trait Implementations§
Source§impl<'a, S, I: FieldInterests> Debug for UpdateResult<'a, S, I>where
S: Debug,
impl<'a, S, I: FieldInterests> Debug for UpdateResult<'a, S, I>where
S: Debug,
Source§impl<'a, S, I: FieldInterests> PartialEq for UpdateResult<'a, S, I>where
S: PartialEq,
impl<'a, S, I: FieldInterests> PartialEq for UpdateResult<'a, S, I>where
S: PartialEq,
Auto Trait Implementations§
impl<'a, S, I> Freeze for UpdateResult<'a, S, I>where
S: Freeze,
impl<'a, S, I> RefUnwindSafe for UpdateResult<'a, S, I>where
S: RefUnwindSafe,
<<I as FieldInterests>::ValidUntil as MaybeInterest<PositiveMonotonicInstant>>::Ty: RefUnwindSafe,
<<I as FieldInterests>::PreferredLifetimeInfo as MaybeInterest<PreferredLifetimeInfo>>::Ty: RefUnwindSafe,
impl<'a, S, I> Send for UpdateResult<'a, S, I>where
S: Send,
<<I as FieldInterests>::ValidUntil as MaybeInterest<PositiveMonotonicInstant>>::Ty: Sync + Send,
<<I as FieldInterests>::PreferredLifetimeInfo as MaybeInterest<PreferredLifetimeInfo>>::Ty: Sync + Send,
impl<'a, S, I> Sync for UpdateResult<'a, S, I>where
S: Sync,
<<I as FieldInterests>::ValidUntil as MaybeInterest<PositiveMonotonicInstant>>::Ty: Sync,
<<I as FieldInterests>::PreferredLifetimeInfo as MaybeInterest<PreferredLifetimeInfo>>::Ty: Sync,
impl<'a, S, I> Unpin for UpdateResult<'a, S, I>where
S: Unpin,
<<I as FieldInterests>::ValidUntil as MaybeInterest<PositiveMonotonicInstant>>::Ty: Unpin,
<<I as FieldInterests>::PreferredLifetimeInfo as MaybeInterest<PreferredLifetimeInfo>>::Ty: Unpin,
impl<'a, S, I> !UnwindSafe for UpdateResult<'a, S, I>
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