pub struct NewThing<'a, S: Schema, M: ThingModel<Schema = S>> { /* private fields */ }Expand description
A thing being inserted or put; add its fields and players, then take
its handle with Self::thing.
Implementations§
Source§impl<S: Schema, M: ThingModel<Schema = S>> NewThing<'_, S, M>
impl<S: Schema, M: ThingModel<Schema = S>> NewThing<'_, S, M>
Sourcepub fn field<Owner, V>(
self,
token: FieldToken<Owner, V>,
value: impl Into<Operand>,
) -> Selfwhere
M: NominalUpcast<Owner>,
Owner: Model<Schema = S>,
pub fn field<Owner, V>(
self,
token: FieldToken<Owner, V>,
value: impl Into<Operand>,
) -> Selfwhere
M: NominalUpcast<Owner>,
Owner: Model<Schema = S>,
Give the new thing a field value.
Sourcepub fn player<Owner, Players, P, PMode>(
self,
role: RoleToken<Owner, Players>,
player: Thing<P, PMode>,
) -> Selfwhere
M: RoleTokenCompatible<Owner, Players>,
Owner: RelationModel<Schema = S>,
Players: RolePlayerBinding<P, PMode>,
P: ThingModel<Schema = S>,
PMode: SelectionMode,
pub fn player<Owner, Players, P, PMode>(
self,
role: RoleToken<Owner, Players>,
player: Thing<P, PMode>,
) -> Selfwhere
M: RoleTokenCompatible<Owner, Players>,
Owner: RelationModel<Schema = S>,
Players: RolePlayerBinding<P, PMode>,
P: ThingModel<Schema = S>,
PMode: SelectionMode,
Give the new relation a role player.
Trait Implementations§
Auto Trait Implementations§
impl<'a, S, M> !RefUnwindSafe for NewThing<'a, S, M>
impl<'a, S, M> !UnwindSafe for NewThing<'a, S, M>
impl<'a, S, M> Freeze for NewThing<'a, S, M>
impl<'a, S, M> Send for NewThing<'a, S, M>
impl<'a, S, M> Sync for NewThing<'a, S, M>
impl<'a, S, M> Unpin for NewThing<'a, S, M>
impl<'a, S, M> UnsafeUnpin for NewThing<'a, S, M>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request