Trait Model
pub trait Model: Sized + 'static {
type Paths<R>: Clone;
const SHAPE: Shape = crate::Shape::Value;
const CHECKS: bool = false;
const OPS: bool = false;
const NULLABLE: bool = false;
const SCALAR: bool = false;
const TABLE: &'static ModelTable = _;
Show 24 methods
// Required methods
fn paths_at<R>(path: Path<R, Self>) -> Self::Paths<R>;
fn to_json(&self) -> Value;
fn from_json(value: &Value) -> Result<Self, ModelError>;
fn load(
doc: &AutoCommit,
value: &Value<'_>,
id: &ExId,
) -> Result<Self, ModelError>;
fn store(
&self,
doc: &mut AutoCommit,
slot: Slot<'_>,
) -> Result<(), ModelError>;
// Provided methods
fn edit(
doc: &mut AutoCommit,
slot: Slot<'_>,
path: &[Segment],
op: &EditOp,
cx: &mut ActionCx,
) -> Result<(), ModelError> { ... }
fn diff<R>(&self, after: &Self, path: &[Segment], out: &mut Vec<Edit<R>>) { ... }
fn nested_collections(&self) -> Vec<ItemCollection> { ... }
fn value_schema() -> Value { ... }
fn field_type(types: &mut TypeSet) -> FieldType { ... }
fn read_whole(&mut self, doc: &AutoCommit) -> Result<(), ModelError> { ... }
fn check(&self) -> Result<(), Refusal> { ... }
fn label(&self) -> Option<String> { ... }
fn op_coalesces(
path: &[Segment],
previous: &Value,
next: &Value,
) -> Option<bool> { ... }
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool> { ... }
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription> { ... }
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place> { ... }
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>) { ... }
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
where Self: 'static { ... }
fn missing() -> Result<Self, ModelError> { ... }
fn stores_as(&self, before: &Self) -> bool { ... }
fn store_changed(
&self,
before: &Self,
doc: &mut AutoCommit,
slot: Slot<'_>,
dirty: &Delta,
) -> Result<(), ModelError> { ... }
fn refresh(
&mut self,
doc: &AutoCommit,
value: &Value<'_>,
id: &ExId,
delta: &Delta,
) -> Result<(), ModelError> { ... }
fn collect_text(&self, _out: &mut Vec<String>) { ... }
}Expand description
A typed value stored in a CRDT document. See the module docs.
Provided Associated Constants§
const SHAPE: Shape = crate::Shape::Value
const SHAPE: Shape = crate::Shape::Value
How the value is laid out in the document; see Shape.
Types written whole keep the default.
const CHECKS: bool = false
const CHECKS: bool = false
Whether this type or any value inside it has a #[model(check)]
invariant; Self::check has nothing to do otherwise.
const OPS: bool = false
const OPS: bool = false
Whether this type or a value inside it has a vocabulary of its own
(Operations, rich text’s): a record routes
those edits’ gestures, landing places and schemas only into such
fields, and never instantiates the routing for the others.
const NULLABLE: bool = false
const NULLABLE: bool = false
Whether null is a value of the type: an absent Option. A field
edit setting any other type to null is refused.
const TABLE: &'static ModelTable = _
const TABLE: &'static ModelTable = _
The type’s functions as data, which a record holding it reaches it
through ([crate::table]): by default its own functions, erased.
Required Associated Types§
Required Methods§
fn load(
doc: &AutoCommit,
value: &Value<'_>,
id: &ExId,
) -> Result<Self, ModelError>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Self, ModelError>
Read from the value a parent found in its slot.
§Errors
Returns [ModelError] when the stored value has another shape.
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
Write self into slot, changing only what differs from what the slot
already holds.
Provided Methods§
fn edit(
doc: &mut AutoCommit,
slot: Slot<'_>,
path: &[Segment],
op: &EditOp,
cx: &mut ActionCx,
) -> Result<(), ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
Apply the field edit op at path, below the value in slot,
touching only what it changes, then run the invariants of the values
it touched. The default edits a value only as a whole.
fn diff<R>(&self, after: &Self, path: &[Segment], out: &mut Vec<Edit<R>>)
fn diff<R>(&self, after: &Self, path: &[Segment], out: &mut Vec<Edit<R>>)
The field edits that turn self into after, at path below the
record: what a surface that edited a local copy submits. The default
sets the value whole when it changed; containers and records edit
only what differs, item by item and field by field. A value that
would store as it is (Self::stores_as) is compared in memory,
without turning either side into JSON.
fn nested_collections(&self) -> Vec<ItemCollection>
fn nested_collections(&self) -> Vec<ItemCollection>
The item collections inside this value, when it is an item of a
collection itself (a slide’s elements); #[derive(Model)] lists a
record’s, the default has none.
fn value_schema() -> Value
fn value_schema() -> Value
The JSON Schema of this value’s JSON form (Self::to_json), as
the published field edit describes what a path takes; the default
accepts any value.
fn field_type(types: &mut TypeSet) -> FieldType
fn field_type(types: &mut TypeSet) -> FieldType
This value’s type in the language-neutral vocabulary a surface
publishes (FieldType), declaring the records
and enums it names in types. The default describes no type: any
value.
fn read_whole(&mut self, doc: &AutoCommit) -> Result<(), ModelError>
fn read_whole(&mut self, doc: &AutoCommit) -> Result<(), ModelError>
Read everything this value holds, for a field marked
#[model(whole)]: a value read lazily (rich text reads its
paragraphs as views ask for them) reads all of it, so every reader of
the record — a verb, search, read_content — sees all of it. The
default has nothing more to read.
§Errors
Returns [ModelError] when the document no longer holds the value.
fn check(&self) -> Result<(), Refusal>
fn check(&self) -> Result<(), Refusal>
Run every #[model(check)] invariant of this value and the values
inside it.
fn label(&self) -> Option<String>
fn label(&self) -> Option<String>
What names this value for people (#[model(label)]): history, search,
agents and item resources use it.
fn op_coalesces(
path: &[Segment],
previous: &Value,
next: &Value,
) -> Option<bool>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
Whether two edits in the own vocabulary of the value at path below
this type are one gesture (Operations); None
when nothing there has one.
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
Whether a gesture may go on after the edit op at path.
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
What the edit op at path below this type did, in the history
entry’s terms (Operations::describe).
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
Where the actor of the edit op at path below this value is after
it applied.
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
The schemas of the own vocabularies of the values below this type,
by path pattern from prefix (* for every item).
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>where
Self: 'static,
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>where
Self: 'static,
The value at path below this one, if it is there. A value with
nothing inside it is found only at the empty path.
fn missing() -> Result<Self, ModelError>
fn missing() -> Result<Self, ModelError>
The value of an absent slot. Types with a natural empty value return it, so a field added to a schema reads older documents without migration.
§Errors
Returns [ModelError::Missing] for types without an empty value.
fn stores_as(&self, before: &Self) -> bool
fn stores_as(&self, before: &Self) -> bool
Whether writing self over a slot that holds before, as a
store left it, would change nothing: an in-memory
comparison, so an action that changed one item of a long collection
does not visit the others. Must only answer true when store would
write no operation; the default answers false (unknown).
fn store_changed(
&self,
before: &Self,
doc: &mut AutoCommit,
slot: Slot<'_>,
dirty: &Delta,
) -> Result<(), ModelError>
fn store_changed( &self, before: &Self, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
Write self into slot, which holds before: exactly the operations
store would write, found by comparing with before
where store would read the document.
before is what load reads from the slot now, and the
slot is as a store left it except where dirty (changes written by
someone else since) says otherwise: a slot dirty touched is written
as store would. The default is store. An action’s write is
replayed on every replica, so an override that writes anything else
forks the document.
fn refresh(
&mut self,
doc: &AutoCommit,
value: &Value<'_>,
id: &ExId,
delta: &Delta,
) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
Bring a value read earlier up to date after the changes in delta,
re-reading only what they touched. value and id are what the
parent’s slot holds now — the same object as when self was read, or
the parent would have read it anew. The default reads the value again,
which is right for scalars and short values.
§Errors
Returns [ModelError] when the stored value has another shape.
fn collect_text(&self, _out: &mut Vec<String>)
fn collect_text(&self, _out: &mut Vec<String>)
Append the human-readable text this value carries, for search indexing.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
§impl Model for bool
impl Model for bool
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, bool>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, bool>) -> Path<R, bool>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<bool, ModelError>
fn load(_: &AutoCommit, value: &Value<'_>, _: &ExId) -> Result<bool, ModelError>
fn missing() -> Result<bool, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &bool) -> bool
§impl Model for f32
impl Model for f32
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, f32>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, f32>) -> Path<R, f32>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<f32, ModelError>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<f32, ModelError>
fn missing() -> Result<f32, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &f32) -> bool
§impl Model for f64
impl Model for f64
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, f64>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, f64>) -> Path<R, f64>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<f64, ModelError>
fn load(_: &AutoCommit, value: &Value<'_>, _: &ExId) -> Result<f64, ModelError>
fn missing() -> Result<f64, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &f64) -> bool
§impl Model for i8
impl Model for i8
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, i8>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, i8>) -> Path<R, i8>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<i8, ModelError>
fn load(_: &AutoCommit, value: &Value<'_>, _: &ExId) -> Result<i8, ModelError>
fn missing() -> Result<i8, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &i8) -> bool
§impl Model for i16
impl Model for i16
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, i16>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, i16>) -> Path<R, i16>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<i16, ModelError>
fn load(_: &AutoCommit, value: &Value<'_>, _: &ExId) -> Result<i16, ModelError>
fn missing() -> Result<i16, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &i16) -> bool
§impl Model for i32
impl Model for i32
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, i32>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, i32>) -> Path<R, i32>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<i32, ModelError>
fn load(_: &AutoCommit, value: &Value<'_>, _: &ExId) -> Result<i32, ModelError>
fn missing() -> Result<i32, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &i32) -> bool
§impl Model for i64
impl Model for i64
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, i64>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, i64>) -> Path<R, i64>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<i64, ModelError>
fn load(_: &AutoCommit, value: &Value<'_>, _: &ExId) -> Result<i64, ModelError>
fn missing() -> Result<i64, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &i64) -> bool
§impl Model for isize
impl Model for isize
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, isize>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, isize>) -> Path<R, isize>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<isize, ModelError>
fn load( _: &AutoCommit, value: &Value<'_>, _: &ExId, ) -> Result<isize, ModelError>
fn missing() -> Result<isize, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &isize) -> bool
§impl Model for u8
impl Model for u8
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, u8>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, u8>) -> Path<R, u8>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<u8, ModelError>
fn load(_: &AutoCommit, value: &Value<'_>, _: &ExId) -> Result<u8, ModelError>
fn missing() -> Result<u8, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &u8) -> bool
§impl Model for u16
impl Model for u16
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, u16>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, u16>) -> Path<R, u16>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<u16, ModelError>
fn load(_: &AutoCommit, value: &Value<'_>, _: &ExId) -> Result<u16, ModelError>
fn missing() -> Result<u16, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &u16) -> bool
§impl Model for u32
impl Model for u32
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, u32>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, u32>) -> Path<R, u32>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<u32, ModelError>
fn load(_: &AutoCommit, value: &Value<'_>, _: &ExId) -> Result<u32, ModelError>
fn missing() -> Result<u32, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &u32) -> bool
§impl Model for u64
impl Model for u64
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, u64>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, u64>) -> Path<R, u64>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<u64, ModelError>
fn load(_: &AutoCommit, value: &Value<'_>, _: &ExId) -> Result<u64, ModelError>
fn missing() -> Result<u64, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &u64) -> bool
§impl Model for ()
Nothing: a value that stores nothing, for the members of a container that
only orders ids (a [Grid]’s rows and columns).
impl Model for ()
Nothing: a value that stores nothing, for the members of a container that
only orders ids (a [Grid]’s rows and columns).
§fn store(&self, _: &mut AutoCommit, _: Slot<'_>) -> Result<(), ModelError>
fn store(&self, _: &mut AutoCommit, _: Slot<'_>) -> Result<(), ModelError>
Nothing is written: an absent slot reads as () already.
const TABLE: &'static ModelTable
type Paths<R> = Path<R, ()>
fn paths_at<R>(path: Path<R, ()>) -> Path<R, ()>
fn to_json(&self) -> Value
fn from_json(_: &Value) -> Result<(), ModelError>
fn load(_: &AutoCommit, _: &Value<'_>, _: &ExId) -> Result<(), ModelError>
fn missing() -> Result<(), ModelError>
§impl Model for usize
impl Model for usize
const SCALAR: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, usize>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, usize>) -> Path<R, usize>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<usize, ModelError>
fn load( _: &AutoCommit, value: &Value<'_>, _: &ExId, ) -> Result<usize, ModelError>
fn missing() -> Result<usize, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &usize) -> bool
§impl Model for String
impl Model for String
§fn store_changed(
&self,
before: &String,
doc: &mut AutoCommit,
slot: Slot<'_>,
_dirty: &Delta,
) -> Result<(), ModelError>
fn store_changed( &self, before: &String, doc: &mut AutoCommit, slot: Slot<'_>, _dirty: &Delta, ) -> Result<(), ModelError>
The one splice store makes, found from before
instead of reading the whole text back.
const TABLE: &'static ModelTable
type Paths<R> = Path<R, String>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, String>) -> Path<R, String>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<String, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, _cx: &mut ActionCx, ) -> Result<(), ModelError>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<String, ModelError>
fn missing() -> Result<String, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &String) -> bool
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for Agent
impl Model for Agent
§fn label(&self) -> Option<String>
fn label(&self) -> Option<String>
The label: what its label = path names it, else the texts
of its label fields joined by spaces, else its
#[model(label)] field.
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = AgentPaths<__R>
fn paths_at<__R>(path: Path<__R, Agent>) -> <Agent as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Agent, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>(&self, after: &Agent, path: &[Segment], out: &mut Vec<Edit<__E>>)
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Agent, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<Agent, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Agent) -> bool
fn store_changed( &self, before: &Agent, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for AgentState
impl Model for AgentState
const TABLE: &'static ModelTable
type Paths<__R> = Path<__R, AgentState>
fn paths_at<__R>(path: Path<__R, AgentState>) -> Path<__R, AgentState>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<AgentState, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn diff<R>(&self, after: &AgentState, path: &[Segment], out: &mut Vec<Edit<R>>)
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<AgentState, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &AgentState) -> bool
fn store_changed( &self, before: &AgentState, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<AgentState, ModelError>
§impl Model for Anchor
impl Model for Anchor
const CHECKS: bool
type Paths<__R> = Path<__R, Anchor>
fn paths_at<__R>(path: Path<__R, Anchor>) -> Path<__R, Anchor>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Anchor, ModelError>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Anchor, ModelError>
fn missing() -> Result<Anchor, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn check(&self) -> Result<(), Refusal>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for Attached
impl Model for Attached
const CHECKS: bool
type Paths<__R> = Path<__R, Attached>
fn paths_at<__R>(path: Path<__R, Attached>) -> Path<__R, Attached>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Attached, ModelError>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Attached, ModelError>
fn missing() -> Result<Attached, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn check(&self) -> Result<(), Refusal>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for Bound
impl Model for Bound
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = BoundPaths<__R>
fn paths_at<__R>(path: Path<__R, Bound>) -> <Bound as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Bound, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>(&self, after: &Bound, path: &[Segment], out: &mut Vec<Edit<__E>>)
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Bound, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<Bound, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Bound) -> bool
fn store_changed( &self, before: &Bound, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for ContextField
impl Model for ContextField
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = ContextFieldPaths<__R>
fn paths_at<__R>( path: Path<__R, ContextField>, ) -> <ContextField as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<ContextField, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &ContextField, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<ContextField, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<ContextField, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &ContextField) -> bool
fn store_changed( &self, before: &ContextField, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for CropRef
impl Model for CropRef
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = CropRefPaths<__R>
fn paths_at<__R>(path: Path<__R, CropRef>) -> <CropRef as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<CropRef, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>(&self, after: &CropRef, path: &[Segment], out: &mut Vec<Edit<__E>>)
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<CropRef, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<CropRef, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &CropRef) -> bool
fn store_changed( &self, before: &CropRef, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for Destination
impl Model for Destination
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = DestinationPaths<__R>
fn paths_at<__R>( path: Path<__R, Destination>, ) -> <Destination as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Destination, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &Destination, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Destination, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<Destination, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Destination) -> bool
fn store_changed( &self, before: &Destination, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for Ed25519PublicKey
impl Model for Ed25519PublicKey
const SHAPE: Shape = <[u8; 32] as tilo_resource::Model>::SHAPE
const CHECKS: bool = <[u8; 32] as tilo_resource::Model>::CHECKS
const SCALAR: bool = <[u8; 32] as tilo_resource::Model>::SCALAR
const NULLABLE: bool = <[u8; 32] as tilo_resource::Model>::NULLABLE
const OPS: bool = <[u8; 32] as tilo_resource::Model>::OPS
type Paths<__R> = Path<__R, Ed25519PublicKey>
fn paths_at<__R>( path: Path<__R, Ed25519PublicKey>, ) -> Path<__R, Ed25519PublicKey>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Ed25519PublicKey, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn label(&self) -> Option<String>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Ed25519PublicKey, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<Ed25519PublicKey, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Ed25519PublicKey) -> bool
fn store_changed( &self, before: &Ed25519PublicKey, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for Emoji
impl Model for Emoji
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = EmojiPaths<__R>
fn paths_at<__R>(path: Path<__R, Emoji>) -> <Emoji as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Emoji, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>(&self, after: &Emoji, path: &[Segment], out: &mut Vec<Edit<__E>>)
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Emoji, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<Emoji, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Emoji) -> bool
fn store_changed( &self, before: &Emoji, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for EmojiImage
impl Model for EmojiImage
const TABLE: &'static ModelTable
const SCALAR: bool = true
type Paths<R> = Path<R, EmojiImage>
fn paths_at<R>(path: Path<R, EmojiImage>) -> Path<R, EmojiImage>
fn value_schema() -> Value
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<EmojiImage, ModelError>
fn load( _: &AutoCommit, value: &Value<'_>, _: &ExId, ) -> Result<EmojiImage, ModelError>
fn missing() -> Result<EmojiImage, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
§impl Model for FrameTimings
impl Model for FrameTimings
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = FrameTimingsPaths<__R>
fn paths_at<__R>( path: Path<__R, FrameTimings>, ) -> <FrameTimings as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<FrameTimings, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &FrameTimings, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<FrameTimings, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<FrameTimings, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &FrameTimings) -> bool
fn store_changed( &self, before: &FrameTimings, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for Hidden
impl Model for Hidden
const TABLE: &'static ModelTable
type Paths<__R> = Path<__R, Hidden>
fn paths_at<__R>(path: Path<__R, Hidden>) -> Path<__R, Hidden>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Hidden, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn diff<R>(&self, after: &Hidden, path: &[Segment], out: &mut Vec<Edit<R>>)
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Hidden, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Hidden) -> bool
fn store_changed( &self, before: &Hidden, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<Hidden, ModelError>
§impl Model for Interaction
impl Model for Interaction
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = InteractionPaths<__R>
fn paths_at<__R>( path: Path<__R, Interaction>, ) -> <Interaction as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Interaction, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &Interaction, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Interaction, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<Interaction, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Interaction) -> bool
fn store_changed( &self, before: &Interaction, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for MarkSpan
impl Model for MarkSpan
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = MarkSpanPaths<__R>
fn paths_at<__R>(path: Path<__R, MarkSpan>) -> <MarkSpan as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<MarkSpan, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &MarkSpan, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<MarkSpan, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<MarkSpan, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &MarkSpan) -> bool
fn store_changed( &self, before: &MarkSpan, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for MarkValue
impl Model for MarkValue
const CHECKS: bool
type Paths<__R> = Path<__R, MarkValue>
fn paths_at<__R>(path: Path<__R, MarkValue>) -> Path<__R, MarkValue>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<MarkValue, ModelError>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<MarkValue, ModelError>
fn missing() -> Result<MarkValue, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn check(&self) -> Result<(), Refusal>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for Outcome
impl Model for Outcome
const TABLE: &'static ModelTable
type Paths<__R> = Path<__R, Outcome>
fn paths_at<__R>(path: Path<__R, Outcome>) -> Path<__R, Outcome>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Outcome, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn diff<R>(&self, after: &Outcome, path: &[Segment], out: &mut Vec<Edit<R>>)
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Outcome, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Outcome) -> bool
fn store_changed( &self, before: &Outcome, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<Outcome, ModelError>
§impl Model for Part
impl Model for Part
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = PartPaths<__R>
fn paths_at<__R>(path: Path<__R, Part>) -> <Part as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Part, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>(&self, after: &Part, path: &[Segment], out: &mut Vec<Edit<__E>>)
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Part, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<Part, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Part) -> bool
fn store_changed( &self, before: &Part, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for RecordingRef
impl Model for RecordingRef
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = RecordingRefPaths<__R>
fn paths_at<__R>( path: Path<__R, RecordingRef>, ) -> <RecordingRef as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<RecordingRef, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &RecordingRef, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<RecordingRef, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<RecordingRef, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &RecordingRef) -> bool
fn store_changed( &self, before: &RecordingRef, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for ResourceAt
impl Model for ResourceAt
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = ResourceAtPaths<__R>
fn paths_at<__R>( path: Path<__R, ResourceAt>, ) -> <ResourceAt as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<ResourceAt, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &ResourceAt, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<ResourceAt, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<ResourceAt, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &ResourceAt) -> bool
fn store_changed( &self, before: &ResourceAt, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for ResourceRef
impl Model for ResourceRef
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = ResourceRefPaths<__R>
fn paths_at<__R>( path: Path<__R, ResourceRef>, ) -> <ResourceRef as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<ResourceRef, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &ResourceRef, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<ResourceRef, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<ResourceRef, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &ResourceRef) -> bool
fn store_changed( &self, before: &ResourceRef, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for ReviewedFeedback
impl Model for ReviewedFeedback
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = ReviewedFeedbackPaths<__R>
fn paths_at<__R>( path: Path<__R, ReviewedFeedback>, ) -> <ReviewedFeedback as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<ReviewedFeedback, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &ReviewedFeedback, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<ReviewedFeedback, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<ReviewedFeedback, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &ReviewedFeedback) -> bool
fn store_changed( &self, before: &ReviewedFeedback, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for ReviewedSelection
impl Model for ReviewedSelection
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = ReviewedSelectionPaths<__R>
fn paths_at<__R>( path: Path<__R, ReviewedSelection>, ) -> <ReviewedSelection as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<ReviewedSelection, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &ReviewedSelection, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<ReviewedSelection, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<ReviewedSelection, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &ReviewedSelection) -> bool
fn store_changed( &self, before: &ReviewedSelection, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for ReviewedText
impl Model for ReviewedText
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = ReviewedTextPaths<__R>
fn paths_at<__R>( path: Path<__R, ReviewedText>, ) -> <ReviewedText as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<ReviewedText, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &ReviewedText, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<ReviewedText, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<ReviewedText, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &ReviewedText) -> bool
fn store_changed( &self, before: &ReviewedText, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for ScreenshotRef
impl Model for ScreenshotRef
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = ScreenshotRefPaths<__R>
fn paths_at<__R>( path: Path<__R, ScreenshotRef>, ) -> <ScreenshotRef as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<ScreenshotRef, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &ScreenshotRef, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<ScreenshotRef, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<ScreenshotRef, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &ScreenshotRef) -> bool
fn store_changed( &self, before: &ScreenshotRef, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for Span
impl Model for Span
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = SpanPaths<__R>
fn paths_at<__R>(path: Path<__R, Span>) -> <Span as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Span, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>(&self, after: &Span, path: &[Segment], out: &mut Vec<Edit<__E>>)
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Span, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<Span, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Span) -> bool
fn store_changed( &self, before: &Span, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for SpanUnit
impl Model for SpanUnit
const TABLE: &'static ModelTable
type Paths<__R> = Path<__R, SpanUnit>
fn paths_at<__R>(path: Path<__R, SpanUnit>) -> Path<__R, SpanUnit>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<SpanUnit, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn diff<R>(&self, after: &SpanUnit, path: &[Segment], out: &mut Vec<Edit<R>>)
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<SpanUnit, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &SpanUnit) -> bool
fn store_changed( &self, before: &SpanUnit, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<SpanUnit, ModelError>
§impl Model for Spent
impl Model for Spent
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = SpentPaths<__R>
fn paths_at<__R>(path: Path<__R, Spent>) -> <Spent as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Spent, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>(&self, after: &Spent, path: &[Segment], out: &mut Vec<Edit<__E>>)
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Spent, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<Spent, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Spent) -> bool
fn store_changed( &self, before: &Spent, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for StoredFile
impl Model for StoredFile
const CHECKS: bool
type Paths<__R> = Path<__R, StoredFile>
fn paths_at<__R>(path: Path<__R, StoredFile>) -> Path<__R, StoredFile>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<StoredFile, ModelError>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<StoredFile, ModelError>
fn missing() -> Result<StoredFile, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn check(&self) -> Result<(), Refusal>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for Submission
impl Model for Submission
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = SubmissionPaths<__R>
fn paths_at<__R>( path: Path<__R, Submission>, ) -> <Submission as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Submission, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &Submission, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Submission, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<Submission, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Submission) -> bool
fn store_changed( &self, before: &Submission, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for TextKind
impl Model for TextKind
const TABLE: &'static ModelTable
type Paths<__R> = Path<__R, TextKind>
fn paths_at<__R>(path: Path<__R, TextKind>) -> Path<__R, TextKind>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<TextKind, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn diff<R>(&self, after: &TextKind, path: &[Segment], out: &mut Vec<Edit<R>>)
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<TextKind, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &TextKind) -> bool
fn store_changed( &self, before: &TextKind, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<TextKind, ModelError>
§impl Model for WorkspaceAgents
impl Model for WorkspaceAgents
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = WorkspaceAgentsPaths<__R>
fn paths_at<__R>( path: Path<__R, WorkspaceAgents>, ) -> <WorkspaceAgents as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<WorkspaceAgents, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &WorkspaceAgents, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<WorkspaceAgents, ModelError>
fn nested_collections(&self) -> Vec<ItemCollection>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<WorkspaceAgents, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &WorkspaceAgents) -> bool
fn store_changed( &self, before: &WorkspaceAgents, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl Model for WorkspaceEmoji
impl Model for WorkspaceEmoji
const SHAPE: Shape
const CHECKS: bool
const OPS: bool
const TABLE: &'static ModelTable
type Paths<__R> = WorkspaceEmojiPaths<__R>
fn paths_at<__R>( path: Path<__R, WorkspaceEmoji>, ) -> <WorkspaceEmoji as Model>::Paths<__R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<WorkspaceEmoji, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn diff<__E>( &self, after: &WorkspaceEmoji, path: &[Segment], out: &mut Vec<Edit<__E>>, )
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<WorkspaceEmoji, ModelError>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn missing() -> Result<WorkspaceEmoji, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &WorkspaceEmoji) -> bool
fn store_changed( &self, before: &WorkspaceEmoji, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl<T> Model for Option<T>where
T: Model,
impl<T> Model for Option<T>where
T: Model,
const SHAPE: Shape = T::SHAPE
const CHECKS: bool = T::CHECKS
const OPS: bool = T::OPS
const NULLABLE: bool = true
const TABLE: &'static ModelTable
type Paths<R> = Path<R, Option<T>>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, Option<T>>) -> Path<R, Option<T>>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Option<T>, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn diff<R>(&self, after: &Option<T>, path: &[Segment], out: &mut Vec<Edit<R>>)
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Option<T>, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Option<T>) -> bool
fn store_changed( &self, before: &Option<T>, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
fn label(&self) -> Option<String>
fn missing() -> Result<Option<T>, ModelError>
§impl<T> Model for Box<T>where
T: Model,
impl<T> Model for Box<T>where
T: Model,
const SCALAR: bool = T::SCALAR
const SHAPE: Shape = T::SHAPE
const CHECKS: bool = T::CHECKS
const OPS: bool = T::OPS
const NULLABLE: bool = T::NULLABLE
type Paths<R> = <T as Model>::Paths<R>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn paths_at<R>(path: Path<R, Box<T>>) -> <T as Model>::Paths<R>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Box<T>, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn diff<R>(&self, after: &Box<T>, path: &[Segment], out: &mut Vec<Edit<R>>)
fn label(&self) -> Option<String>
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>where
Box<T>: 'static,
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Box<T>, ModelError>
fn missing() -> Result<Box<T>, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Box<T>) -> bool
fn store_changed( &self, before: &Box<T>, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
§impl<T> Model for BTreeMap<String, T>where
T: Model,
impl<T> Model for BTreeMap<String, T>where
T: Model,
const SHAPE: Shape
const CHECKS: bool = T::CHECKS
const OPS: bool = T::OPS
const TABLE: &'static ModelTable
type Paths<R> = Path<R, BTreeMap<String, T>>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>( path: Path<R, BTreeMap<String, T>>, ) -> Path<R, BTreeMap<String, T>>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<BTreeMap<String, T>, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn diff<R>( &self, after: &BTreeMap<String, T>, path: &[Segment], out: &mut Vec<Edit<R>>, )
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<BTreeMap<String, T>, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &BTreeMap<String, T>) -> bool
fn store_changed( &self, before: &BTreeMap<String, T>, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
fn missing() -> Result<BTreeMap<String, T>, ModelError>
§impl<T> Model for Vec<T>where
T: Model,
impl<T> Model for Vec<T>where
T: Model,
const CHECKS: bool = T::CHECKS
const OPS: bool = T::OPS
const TABLE: &'static ModelTable
type Paths<R> = Path<R, Vec<T>>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, Vec<T>>) -> Path<R, Vec<T>>
fn op_coalesces( path: &[Segment], previous: &Value, next: &Value, ) -> Option<bool>
fn op_continuable(path: &[Segment], op: &Value) -> Option<bool>
fn op_describe(path: &[Segment], op: &Value) -> Option<OpDescription>
fn op_lands(&self, path: &[Segment], op: &Value) -> Option<Place>
fn op_schemas(prefix: &str, out: &mut Vec<(String, Value)>)
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<Vec<T>, ModelError>
fn edit( doc: &mut AutoCommit, slot: Slot<'_>, path: &[Segment], op: &EditOp, cx: &mut ActionCx, ) -> Result<(), ModelError>
fn check(&self) -> Result<(), Refusal>
fn get_at(&self, path: &[Segment]) -> Option<&(dyn Any + 'static)>
fn diff<R>(&self, after: &Vec<T>, path: &[Segment], out: &mut Vec<Edit<R>>)
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<Vec<T>, ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
fn stores_as(&self, before: &Vec<T>) -> bool
fn store_changed( &self, before: &Vec<T>, doc: &mut AutoCommit, slot: Slot<'_>, dirty: &Delta, ) -> Result<(), ModelError>
fn refresh( &mut self, doc: &AutoCommit, value: &Value<'_>, id: &ExId, delta: &Delta, ) -> Result<(), ModelError>
fn collect_text(&self, out: &mut Vec<String>)
fn missing() -> Result<Vec<T>, ModelError>
§impl<T, const N: usize> Model for [T; N]where
T: Model,
impl<T, const N: usize> Model for [T; N]where
T: Model,
const CHECKS: bool = T::CHECKS
const OPS: bool = T::OPS
type Paths<R> = Path<R, [T; N]>
fn value_schema() -> Value
fn field_type(types: &mut TypeSet) -> FieldType
fn paths_at<R>(path: Path<R, [T; N]>) -> Path<R, [T; N]>
fn to_json(&self) -> Value
fn from_json(value: &Value) -> Result<[T; N], ModelError>
fn load( doc: &AutoCommit, value: &Value<'_>, id: &ExId, ) -> Result<[T; N], ModelError>
fn missing() -> Result<[T; N], ModelError>
fn store(&self, doc: &mut AutoCommit, slot: Slot<'_>) -> Result<(), ModelError>
Implementors§
§impl Model for FirstDayOfWeek
impl Model for FirstDayOfWeek
§impl Model for NumberStyle
impl Model for NumberStyle
Source§impl Model for FeedbackDraft
impl Model for FeedbackDraft
§impl Model for CapOverride
impl Model for CapOverride
§impl Model for TextAssistancePrefs
impl Model for TextAssistancePrefs
§impl Model for DistributionDefaults
impl Model for DistributionDefaults
§impl Model for ActionParam
impl Model for ActionParam
§impl<O> Model for Settled<O>
A settlement stores as one JSON value: it is written once, by the owning
device.
impl<O> Model for Settled<O>
A settlement stores as one JSON value: it is written once, by the owning device.