pub trait ChildRecord: Resource<State: Model + Default> {
type Parent: Resource;
// Required methods
fn container(parent: &<Self::Parent as Resource>::State) -> &Container;
fn container_path() -> Vec<Segment>;
// Provided methods
fn parent_record() -> RecordId { ... }
fn check_group(
parent: &<Self::Parent as Resource>::State,
group: Option<&Id>,
) -> Result<(), String> { ... }
}Expand description
A resource whose records are children a record lists. See the module docs.
Required Associated Types§
Required Methods§
Sourcefn container(parent: &<Self::Parent as Resource>::State) -> &Container
fn container(parent: &<Self::Parent as Resource>::State) -> &Container
The container of the parent that lists them.
Sourcefn container_path() -> Vec<Segment>
fn container_path() -> Vec<Segment>
Where the container is in the parent’s document: its field.
Provided Methods§
Sourcefn parent_record() -> RecordId
fn parent_record() -> RecordId
The record that lists them: the app’s own record in its workspace.
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.