ViewUpdate

Struct ViewUpdate 

Source
pub struct ViewUpdate<R: ViewRel, Choice>(pub Snapshot<Mapping<Choice, (R::Auth, R::Frag)>>);

Tuple Fields§

§0: Snapshot<Mapping<Choice, (R::Auth, R::Frag)>>

Trait Implementations§

Source§

impl<R: ViewRel, Choice> Update<View<R>> for ViewUpdate<R, Choice>

Source§

fn premise(self, from: View<R>) -> bool

(open)

pearlite! {
    from.auth() != None &&
    (forall<ch: Choice> R::rel(Some(self.0[ch].0), self.0[ch].1)) &&
    forall<frame: R::Frag>
        match from.frag().op(frame) {
            Some(ff) => R::rel(from.auth(), ff),
            None => false
        } ==>
        exists<ch: Choice>
            match self.0[ch].1.op(frame) {
                Some(ff) => R::rel(Some(self.0[ch].0), ff),
                None => false
            }
}
Source§

fn update(self, from: View<R>, ch: Choice) -> View<R>

(open)

View::new(Some(self.0[ch].0), self.0[ch].1)

requires

self.premise(from)

Source§

fn frame_preserving(self, from: View<R>, frame: View<R>) -> Choice

requires

self.premise(from)

requires

from.op(frame) != None

ensures

self.update(from, result).op(frame) != None

Source§

type Choice = Choice

Auto Trait Implementations§

§

impl<R, Choice> Freeze for ViewUpdate<R, Choice>

§

impl<R, Choice> RefUnwindSafe for ViewUpdate<R, Choice>
where Choice: RefUnwindSafe, <R as ViewRel>::Auth: RefUnwindSafe, <R as ViewRel>::Frag: RefUnwindSafe,

§

impl<R, Choice> Send for ViewUpdate<R, Choice>
where Choice: Send, <R as ViewRel>::Auth: Send, <R as ViewRel>::Frag: Send,

§

impl<R, Choice> Sync for ViewUpdate<R, Choice>
where Choice: Sync, <R as ViewRel>::Auth: Sync, <R as ViewRel>::Frag: Sync,

§

impl<R, Choice> Unpin for ViewUpdate<R, Choice>
where Choice: Unpin, <R as ViewRel>::Auth: Unpin, <R as ViewRel>::Frag: Unpin,

§

impl<R, Choice> UnwindSafe for ViewUpdate<R, Choice>
where Choice: UnwindSafe, <R as ViewRel>::Auth: UnwindSafe, <R as ViewRel>::Frag: 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.