pub struct RoleTokenProjection { /* private fields */ }Expand description
One owner-branded related-role query token.
Implementations§
Source§impl RoleTokenProjection
impl RoleTokenProjection
Sourcepub fn new(
owner: TypeId,
role: RoleId,
target_name: TargetIdentifier,
accepted_players: BTreeSet<TypeId>,
specializes: Option<RoleId>,
multiplicity: ProjectedMultiplicity,
is_abstract: bool,
annotations: BTreeMap<AnnotationFactId, ProjectedAnnotation>,
) -> Result<Self, Diagnostic>
pub fn new( owner: TypeId, role: RoleId, target_name: TargetIdentifier, accepted_players: BTreeSet<TypeId>, specializes: Option<RoleId>, multiplicity: ProjectedMultiplicity, is_abstract: bool, annotations: BTreeMap<AnnotationFactId, ProjectedAnnotation>, ) -> Result<Self, Diagnostic>
Construct an effective role token for one actual relation owner.
Sourcepub fn with_player_union_target_name(
self,
target_name: TargetIdentifier,
) -> Self
pub fn with_player_union_target_name( self, target_name: TargetIdentifier, ) -> Self
Attach the explicit native player-union type name.
Sourcepub const fn target_name(&self) -> &TargetIdentifier
pub const fn target_name(&self) -> &TargetIdentifier
Return the emitted member name.
Sourcepub const fn player_union_target_name(&self) -> Option<&TargetIdentifier>
pub const fn player_union_target_name(&self) -> Option<&TargetIdentifier>
Return the explicit native player-union type name, when the target uses one.
Sourcepub const fn accepted_players(&self) -> &BTreeSet<TypeId>
pub const fn accepted_players(&self) -> &BTreeSet<TypeId>
Return exact logical player identities.
Sourcepub const fn specializes(&self) -> Option<&RoleId>
pub const fn specializes(&self) -> Option<&RoleId>
Return the immediate specialized role, if any.
Sourcepub const fn multiplicity(&self) -> ProjectedMultiplicity
pub const fn multiplicity(&self) -> ProjectedMultiplicity
Return resolved role cardinality shape.
Sourcepub const fn is_abstract(&self) -> bool
pub const fn is_abstract(&self) -> bool
Report whether the role is abstract.
Sourcepub const fn annotations(
&self,
) -> &BTreeMap<AnnotationFactId, ProjectedAnnotation>
pub const fn annotations( &self, ) -> &BTreeMap<AnnotationFactId, ProjectedAnnotation>
Return effective relates annotations.
Trait Implementations§
Source§impl Clone for RoleTokenProjection
impl Clone for RoleTokenProjection
Source§fn clone(&self) -> RoleTokenProjection
fn clone(&self) -> RoleTokenProjection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RoleTokenProjection
impl Debug for RoleTokenProjection
impl Eq for RoleTokenProjection
Source§impl PartialEq for RoleTokenProjection
impl PartialEq for RoleTokenProjection
Source§impl Serialize for RoleTokenProjection
impl Serialize for RoleTokenProjection
impl StructuralPartialEq for RoleTokenProjection
Auto Trait Implementations§
impl Freeze for RoleTokenProjection
impl RefUnwindSafe for RoleTokenProjection
impl Send for RoleTokenProjection
impl Sync for RoleTokenProjection
impl Unpin for RoleTokenProjection
impl UnsafeUnpin for RoleTokenProjection
impl UnwindSafe for RoleTokenProjection
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