pub enum RecordScope {
FileKeyOnly,
Agent,
}Expand description
Which records an operation is allowed to touch.
The registry has two ways to say “this record belongs to X”: the file
key (<instance_id>.json) and the record’s own definition_id. Since
the agent-concept consolidation those are the same value for an agent —
but only for records m0026_registry_agent_id_rekey re-keyed, and that
pass no-ops once db_agent_instances is dropped (schema v32), so a real
install still holds launch-keyed records where they differ. Matching
both is what makes Delete actually remove an agent’s row
(Registry::hard_delete_for_agent).
It is also what makes a TEMPLATE dangerous: a template’s id is the
definition_id of every legacy launch record for the real agents
launched from it, so a wide match would delete/retire/rename THEIR
records along with the template. Hence this type rather than a bool
or a per-call-site if — ReAgent found the same omission at four
separate call sites on PR #3262 (rounds 3 and 4), which is a sign the
decision belongs in the signature, not in each caller’s memory.
Variants§
FileKeyOnly
Only the record whose FILE KEY is this id. The correct scope for a template: its own record, and nothing belonging to its launches.
Agent
Every record for this agent — file key or definition_id.
Trait Implementations§
Source§impl Clone for RecordScope
impl Clone for RecordScope
Source§fn clone(&self) -> RecordScope
fn clone(&self) -> RecordScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RecordScope
Source§impl Debug for RecordScope
impl Debug for RecordScope
impl Eq for RecordScope
Source§impl PartialEq for RecordScope
impl PartialEq for RecordScope
impl StructuralPartialEq for RecordScope
Auto Trait Implementations§
impl Freeze for RecordScope
impl RefUnwindSafe for RecordScope
impl Send for RecordScope
impl Sync for RecordScope
impl Unpin for RecordScope
impl UnsafeUnpin for RecordScope
impl UnwindSafe for RecordScope
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> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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