pub struct EncodeRequest {
pub text: String,
pub session_id: WireSessionId,
pub request_id: WireUuid,
pub txn_id: Option<WireUuid>,
pub occurred_at_unix_nanos: Option<u64>,
pub act_as: Option<ActAs>,
pub wait: WaitMode,
pub allow_duplicates: bool,
}Expand description
ENCODE (0x0020).
Fields§
§text: String§session_id: WireSessionId§request_id: WireUuid§txn_id: Option<WireUuid>§occurred_at_unix_nanos: Option<u64>§act_as: Option<ActAs>Effective identity this encode runs as. None (omitted on the wire)
means the op runs as the connection’s own key-bound identity.
wait: WaitModeHow long the write blocks before replying. This is the single completion
knob for writes (reads use trace instead — see WaitMode).
WaitMode::Ack(the default, omitted on the wire): return as soon as the WAL record is durable; async derivation runs in the background and the response’straceisNone.WaitMode::Derived: block until async derivation completes, then return a populatedtrace: EncodeTrace.
allow_duplicates: boolOpt out of content dedup and force a distinct memory. Default false:
Brain dedupes text ENCODE on (space_id, session_id, BLAKE3(text)) — a
repeat of byte-identical text returns the existing MemoryId
(was_deduplicated = true) and writes nothing new. Set true when the
same text is a genuinely distinct observation that must coexist (e.g. the
same fact re-stated at a different occurred_at). Omitted on the wire in
the default (dedup-on) case.
Trait Implementations§
Source§impl Clone for EncodeRequest
impl Clone for EncodeRequest
Source§impl Debug for EncodeRequest
impl Debug for EncodeRequest
Source§impl<'de> Deserialize<'de> for EncodeRequest
impl<'de> Deserialize<'de> for EncodeRequest
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EncodeRequest
impl PartialEq for EncodeRequest
Source§impl Serialize for EncodeRequest
impl Serialize for EncodeRequest
impl StructuralPartialEq for EncodeRequest
Auto Trait Implementations§
impl Freeze for EncodeRequest
impl RefUnwindSafe for EncodeRequest
impl Send for EncodeRequest
impl Sync for EncodeRequest
impl Unpin for EncodeRequest
impl UnsafeUnpin for EncodeRequest
impl UnwindSafe for EncodeRequest
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