pub enum Originator {
Local {
user: Option<String>,
},
Replicated {
from_node: String,
},
Internal {
component: String,
},
}Expand description
Identity of the party that initiated a write.
Captured on every LogEntry so audit queries can answer
“who/what wrote this record” without a sidecar table, and
replication can distinguish between locally-originated writes
(which must be streamed to peers) and remotely-applied writes
(which were received over the wire and must NOT be re-streamed).
Variants§
Local
Locally-initiated write through the request pipeline. user
is the authenticated principal when available; None for
anonymous writes (e.g., public tables with
@export(public: [create])).
Replicated
Write applied locally in response to a peer’s replication stream. Carries the source node id so replication’s outgoing log writer can filter out these entries — we don’t re-stream what we received.
Internal
Internal write performed by the platform itself — startup
bootstrap, system-table maintenance, scheduled compaction.
component is a short label for diagnostics
("auth-bootstrap", "ttl-sweep", etc.).
Implementations§
Source§impl Originator
impl Originator
Sourcepub fn local(user: impl Into<String>) -> Self
pub fn local(user: impl Into<String>) -> Self
Convenience constructor for authenticated local writes.
Sourcepub const fn is_replicated(&self) -> bool
pub const fn is_replicated(&self) -> bool
True if this write was received over the replication wire (i.e., should not be re-streamed). Used by the outgoing-log writer to filter out apply-from-peer writes.
Trait Implementations§
Source§impl Clone for Originator
impl Clone for Originator
Source§fn clone(&self) -> Originator
fn clone(&self) -> Originator
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 Originator
impl Debug for Originator
Source§impl<'de> Deserialize<'de> for Originator
impl<'de> Deserialize<'de> for Originator
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>,
impl Eq for Originator
Source§impl PartialEq for Originator
impl PartialEq for Originator
Source§fn eq(&self, other: &Originator) -> bool
fn eq(&self, other: &Originator) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for Originator
impl Serialize for Originator
impl StructuralPartialEq for Originator
Auto Trait Implementations§
impl Freeze for Originator
impl RefUnwindSafe for Originator
impl Send for Originator
impl Sync for Originator
impl Unpin for Originator
impl UnsafeUnpin for Originator
impl UnwindSafe for Originator
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.