Enum Chunk

Source
pub enum Chunk<S: Store> {
    Good {
        save: bool,
        value: S::Value,
    },
    Bad,
}
Expand description

A chunk. Don’t touch its insides unless you know what you’re doing!

Variants§

§

Good

A chunk that loaded successfully.

Fields

§save: bool

Whether the chunk needs to be saved.

§value: S::Value

The stuff you care about.

§

Bad

Take a guess.

Implementations§

Source§

impl<S: Store> Chunk<S>

Source

pub fn get(&self) -> Option<&S::Value>

Read some stuff.

Source

pub fn get_mut(&mut self) -> Option<&mut S::Value>

Make some changes.

Auto Trait Implementations§

§

impl<S> Freeze for Chunk<S>
where <S as Store>::Value: Freeze,

§

impl<S> RefUnwindSafe for Chunk<S>
where <S as Store>::Value: RefUnwindSafe,

§

impl<S> Send for Chunk<S>

§

impl<S> Sync for Chunk<S>
where <S as Store>::Value: Sync,

§

impl<S> Unpin for Chunk<S>
where <S as Store>::Value: Unpin,

§

impl<S> UnwindSafe for Chunk<S>
where <S as Store>::Value: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Erased for T