pub struct Children<C: ChildRecord> { /* private fields */ }Expand description
The children of C a record lists, held for a view or surface. See the
module docs.
Implementations§
Source§impl<C: ChildRecord> Children<C>
impl<C: ChildRecord> Children<C>
Sourcepub fn children(&self) -> Vec<Listed<C>> ⓘ
pub fn children(&self) -> Vec<Listed<C>> ⓘ
Every child outside the trash, with its place and its state as a
read, in order: a child whose record is on its way from the workspace is
pending. Show it with ViewCx::arriving.
Sourcepub fn child(&self, id: &Id) -> Option<Rc<C::State>>
pub fn child(&self, id: &Id) -> Option<Rc<C::State>>
Child id, listed or in the trash, when its record is here.
Sourcepub fn create(
&self,
fields: Value,
group: Option<&Id>,
before: Option<&Id>,
) -> Result<Id, ActionError>
pub fn create( &self, fields: Value, group: Option<&Id>, before: Option<&Id>, ) -> Result<Id, ActionError>
Make a child with its first fields (its JSON form, partial) under
group, before before, as the window’s person. Its id.
§Errors
As the door refuses create.
Sourcepub fn move_to(
&self,
id: &Id,
group: Option<&Id>,
before: Option<&Id>,
) -> Result<(), ActionError>
pub fn move_to( &self, id: &Id, group: Option<&Id>, before: Option<&Id>, ) -> Result<(), ActionError>
Sourcepub fn published(&self) -> ResourceSpec
pub fn published(&self) -> ResourceSpec
The container published as the door publishes it, for a test.
Sourcepub fn invoke_published(
&self,
action: &EncodedAction,
invoker: &ActionInvoker,
) -> Result<ActionOutput, String>
pub fn invoke_published( &self, action: &EncodedAction, invoker: &ActionInvoker, ) -> Result<ActionOutput, String>
Carry out a published action of the container, as the door does: what an agent invoking it reaches.
§Errors
As the door refuses it.
Sourcepub fn detached_in(
store: RecordStore,
app_id: &'static str,
me: &str,
parent: impl Fn() -> Rc<<C::Parent as Resource>::State> + 'static,
) -> Option<Self>
pub fn detached_in( store: RecordStore, app_id: &'static str, me: &str, parent: impl Fn() -> Rc<<C::Parent as Resource>::State> + 'static, ) -> Option<Self>
Children held outside any host, for a tool or a test: in store,
which holds the parent’s record, edited as me, who may do
anything, the parent read from parent. None when C does not
read as a child.
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for Children<C>
impl<C> !RefUnwindSafe for Children<C>
impl<C> !Send for Children<C>
impl<C> !Sync for Children<C>
impl<C> Unpin for Children<C>
impl<C> UnsafeUnpin for Children<C>
impl<C> !UnwindSafe for Children<C>
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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