pub enum SideState {
Changed {
state: ItemState,
data: Item,
},
Unchanged {
state: ItemState,
},
}Expand description
Current state of an item on one side (for existing items only).
Variants§
Changed
Item changed from status (data was fetched).
Unchanged
Item unchanged from status (data not fetched).
Implementations§
Source§impl SideState
impl SideState
Sourcepub fn from_fetched(_: FetchedItem) -> Self
pub fn from_fetched(_: FetchedItem) -> Self
Create changed status from a fetched item (changed or new).
Sourcepub fn into_item_with_data(self) -> Option<ItemWithData>
pub fn into_item_with_data(self) -> Option<ItemWithData>
Convert to ItemWithData, returning None if unchanged (data not available).
Sourcepub fn into_item_source(self) -> ItemSource
pub fn into_item_source(self) -> ItemSource
Convert to ItemSource, preserving data if available.
Sourcepub fn into_item_ver(self) -> ItemVersion
pub fn into_item_ver(self) -> ItemVersion
Convert to ItemVersion without copying.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SideState
impl RefUnwindSafe for SideState
impl Send for SideState
impl Sync for SideState
impl Unpin for SideState
impl UnsafeUnpin for SideState
impl UnwindSafe for SideState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
Source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
Source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.