Skip to main content

KernelRequest

Enum KernelRequest 

Source
pub enum KernelRequest {
Show 15 variants Health {}, Status {}, Watermark {}, VerifySealed {}, SubmitCommand { envelope: CommandEnvelope, }, GetProjection { projection: ProjectionKind, id: String, }, ListProjection { projection: ProjectionKind, cursor: Option<String>, limit: Option<u32>, }, ReadEvents { cursor: Option<Seq>, limit: u32, }, SubscribeEvents { cursor: Option<Seq>, }, BlobBegin { media_type: String, byte_size: ByteCount, }, BlobChunk { upload_id: BlobUploadId, sequence: u32, data_base64: String, }, BlobCommit { upload_id: BlobUploadId, address: BlobAddress, }, BlobAbort { upload_id: BlobUploadId, }, BlobRead { address: BlobAddress, offset: ByteCount, length: ByteCount, }, BlobStat { address: BlobAddress, },
}
Expand description

What a client asks for. Tagged by type.

The four field-less requests are written {} rather than as unit variants, and the difference is not cosmetic: serde applies deny_unknown_fields to an internally tagged enum’s STRUCT variants only, so as unit variants they would accept {"type": "health", "limit": 500} and answer as though the caller had said nothing extra. An empty struct variant serializes to the identical {"type": "health"} — the wire does not change, the strictness does.

Variants§

§

Health

Liveness only. Served sealed and active.

§

Status

Full readiness detail. Served sealed and active.

§

Watermark

How far the log goes, without a subscription. Served sealed and active.

§

VerifySealed

Prove the fresh epoch: exactly one genesis event, zero business rows. Served sealed and active.

§

SubmitCommand

The only mutation path. Sealed kernels admit activate_kernel alone.

Fields

§

GetProjection

Fields

§projection: ProjectionKind
§

ListProjection

Fields

§projection: ProjectionKind
§cursor: Option<String>
§limit: Option<u32>
§

ReadEvents

One page of events strictly after cursor (absent = from the beginning). limit is CLAMPED, not refused (MAX_READ_LIMIT).

Fields

§cursor: Option<Seq>
§limit: u32
§

SubscribeEvents

Durable-cursor subscription. Delivery is at-least-once; a reconnect from the last cursor recovers everything, in order.

Fields

§cursor: Option<Seq>
§

BlobBegin

Fields

§media_type: String
§byte_size: ByteCount
§

BlobChunk

One plaintext chunk, base64 in a bounded control frame — blob bytes never ride an ordinary payload (ADR 0001). Chunks are BLOB_CHUNK_BYTES of plaintext, whose base64 expansion stays inside FRAME_BODY_MAX_BYTES.

Fields

§upload_id: BlobUploadId
§sequence: u32

Contiguous from 0; a gap or repeat is a refusal.

§data_base64: String
§

BlobCommit

Finish an upload. The kernel recomputes the plaintext digest and refuses if it is not address.

Fields

§upload_id: BlobUploadId
§address: BlobAddress
§

BlobAbort

Fields

§upload_id: BlobUploadId
§

BlobRead

Fields

§address: BlobAddress
§offset: ByteCount
§length: ByteCount
§

BlobStat

Fields

§address: BlobAddress

Trait Implementations§

Source§

impl Clone for KernelRequest

Source§

fn clone(&self) -> KernelRequest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for KernelRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for KernelRequest

Source§

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 KernelRequest

Source§

fn eq(&self, other: &KernelRequest) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for KernelRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for KernelRequest

Source§

impl Type for KernelRequest

Source§

fn definition(types: &mut Types) -> DataType

Returns a DataType that represents Self. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.