pub struct NestedResource {
pub kind: &'static str,
/* private fields */
}Expand description
A field that holds a resource of its own type (#[model(resource)]): a
note’s rich-text body. #[resource] publishes it beneath the resource
of the record that holds it — the item resource of an item of a
collection (<kind>/pages/<page>/body), or the record itself
(<kind>/body) — with every document action of the field’s type applied
as the record’s field edit at the field’s path. So the field is
addressed like any resource, with its own named actions, and nothing
about it is repeated on the record: no copy of its verbs taking an item
id, no second write path. The record’s history, undo, permissions and
replay are the ones that apply.
Fields§
§kind: &'static strThe field type’s Resource::KIND.
Implementations§
Source§impl NestedResource
impl NestedResource
Sourcepub const fn of<C>() -> Self
pub const fn of<C>() -> Self
The nested resource of a field of type C, whose own operations are
its actions: what #[model(resource)] records in the field’s
FieldShape.
Trait Implementations§
Source§impl Clone for NestedResource
impl Clone for NestedResource
impl Copy for NestedResource
Auto Trait Implementations§
impl Forget for NestedResource
impl Freeze for NestedResource
impl Move for NestedResource
impl RefUnwindSafe for NestedResource
impl Send for NestedResource
impl Sync for NestedResource
impl Unpin for NestedResource
impl UnsafeUnpin for NestedResource
impl UnwindSafe for NestedResource
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
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<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> ⓘ
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> ⓘ
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