#[non_exhaustive]#[repr(u8)]pub enum TargetKind {
Entry(EntryId),
Actor(ActorId),
Space(SpaceId),
Activity(ActivityId),
Extension {
type_code: TypeCode,
id: EntityId,
},
}Expand description
Target entity of an Activity. #[non_exhaustive] so additional canonical
target families can append.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Entry(EntryId)
Entry target.
Actor(ActorId)
Actor target.
Space(SpaceId)
Space target.
Activity(ActivityId)
Activity target (meta-verb — flag on a report, etc.).
Extension
Shell-defined extension target.
Implementations§
Source§impl TargetKind
impl TargetKind
Sourcepub fn key(&self, _ctx: &ActionContext<'_>) -> TargetKey
pub fn key(&self, _ctx: &ActionContext<'_>) -> TargetKey
Derive the idempotency key from a target descriptor.
The ActionContext is currently unused — once ctx.read::<C>()
ships, the target’s shell is resolved from the matching storage
component (EntryCore.shell_id, ActorProfile.shell_id,
SpaceConfig.shell_id, ActivityRecord.shell_id, or
EntityShellId.shell_id for Extension targets). Until then the
returns a zeroed ShellId for callers
that need the real shell must pass it explicitly via
TargetKind::key_with_shell.
Sourcepub fn key_with_shell(&self, target_shell_id: ShellId) -> TargetKey
pub fn key_with_shell(&self, target_shell_id: ShellId) -> TargetKey
Build a TargetKey using an explicit target_shell_id. Useful when
the caller has already resolved the target’s owner (e.g. submit-site
with a freshly-authenticated ShellBrand).
Trait Implementations§
Source§impl Clone for TargetKind
impl Clone for TargetKind
Source§fn clone(&self) -> TargetKind
fn clone(&self) -> TargetKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TargetKind
impl Debug for TargetKind
Source§impl<'de> Deserialize<'de> for TargetKind
impl<'de> Deserialize<'de> for TargetKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TargetKind
impl PartialEq for TargetKind
Source§fn eq(&self, other: &TargetKind) -> bool
fn eq(&self, other: &TargetKind) -> bool
self and other values to be equal, and is used by ==.