pub struct Run<'t>(pub &'t ModelTable);Expand description
A value of a type whose table does the work (Model::to_json of an
Option, a Collection): the type’s functions as the table runs them.
Tuple Fields§
§0: &'t ModelTableImplementations§
Source§impl Run<'_>
impl Run<'_>
pub fn to_json(&self, value: &dyn Any) -> Value
Sourcepub fn from_json<T: 'static>(&self, value: &Value) -> Result<T, ModelError>
pub fn from_json<T: 'static>(&self, value: &Value) -> Result<T, ModelError>
§Errors
Why value is no JSON form of the type.
pub fn load<T: 'static>( &self, doc: &Doc, value: &Value<'_>, id: &ObjId, ) -> Result<T, ModelError>
pub fn missing<T: 'static>(&self) -> Result<T, ModelError>
pub fn store( &self, value: &dyn Any, doc: &mut Doc, slot: Slot<'_>, ) -> Result<(), ModelError>
pub fn stores_as(&self, value: &dyn Any, before: &dyn Any) -> bool
pub fn store_changed( &self, value: &dyn Any, before: &dyn Any, doc: &mut Doc, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
pub fn refresh( &self, target: &mut dyn Any, doc: &Doc, value: &Value<'_>, id: &ObjId, delta: &Delta, ) -> Result<(), ModelError>
pub fn edit( &self, doc: &mut Doc, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
pub fn diff<E>( &self, before: &dyn Any, after: &dyn Any, path: &[Segment], out: &mut Vec<Edit<E>>, )
pub fn collect_text(&self, value: &dyn Any, out: &mut Vec<String>)
pub fn check(&self, value: &dyn Any) -> Result<(), Refusal>
pub fn get_at<'a>( &self, value: &'a dyn Any, path: &[Segment], ) -> Option<&'a dyn Any>
pub fn op_coalesces( &self, path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
pub fn op_continuable(&self, path: &[Segment], op: &Value) -> Option<bool>
pub fn op_describe(&self, path: &[Segment], op: &Value) -> Option<OpDescription>
pub fn op_lands( &self, value: &dyn Any, path: &[Segment], op: &Value, ) -> Option<Place>
pub fn op_schemas(&self, prefix: &str, out: &mut Vec<(String, Value)>)
Auto Trait Implementations§
impl<'t> Forget for Run<'t>
impl<'t> Freeze for Run<'t>
impl<'t> Move for Run<'t>
impl<'t> RefUnwindSafe for Run<'t>
impl<'t> Send for Run<'t>
impl<'t> Sync for Run<'t>
impl<'t> Unpin for Run<'t>
impl<'t> UnsafeUnpin for Run<'t>
impl<'t> UnwindSafe for Run<'t>
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> 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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more