Skip to main content

HttpAdapter

Struct HttpAdapter 

Source
pub struct HttpAdapter { /* private fields */ }
Expand description

The HTTP adapter: executes ops as HTTP requests.

Implementations§

Source§

impl HttpAdapter

Source

pub fn new() -> Self

Create with default config.

Source

pub fn with_config(config: HttpConfig) -> Self

Create with explicit config.

Trait Implementations§

Source§

impl Default for HttpAdapter

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl DriverAdapter for HttpAdapter

Source§

fn known_op_fields(&self) -> Option<&'static [&'static str]>

HTTP adapter reads a closed vocabulary of op fields: request-shape (method, uri / url), body framing (content_type, body), and header overrides (headers). Declaring the list opts this adapter into SRD 30’s unknown-field guard — typos like bdoy: or misplaced core directives surface at init time rather than silently becoming ResolvedFields the adapter never looks at.

Source§

fn name(&self) -> &str

Human-readable adapter name (e.g., “cql”, “http”, “stdout”).
Source§

fn map_op<'a>( &'a self, template: &'a ParsedOp, parent: Arc<dyn Kernel>, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn OpDispenser>, String>> + Send + 'a>>

Map an op template into a dispenser. Called once per unique op template at activity startup — before any cycles execute. Read more
Source§

fn default_status_metrics(&self) -> Vec<StatusMetric>

Default metric names to display on the status line for this adapter. Read more
Source§

fn display_preference(&self) -> DisplayPreference

Preferred display mode for this adapter. Read more
Source§

fn known_op_params(&self) -> &'static [&'static str]

Adapter-specific params keys allowed under an op’s top-level params (not op) section. Returned keys extend the core’s crate::validation::CORE_OP_PARAMS allow-list at op-validation time. Default: empty — adapters that don’t need extras simply rely on the core vocab. Override to declare adapter-only params (e.g. CQL’s cl: consistency-level overrides if those were lifted from op to params someday).
Source§

fn declare_controls(&self, _parent: &Arc<RwLock<Component>>)

Declare adapter-specific dynamic controls (SRD 23) on a subcomponent attached to the activity’s component. Called once per activity, after the activity declares its own concurrency / rate controls. The default no-op fits adapters that have no adapter-level dynamic knobs. Read more
Source§

fn shutdown<'a>(&'a self) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>

Async teardown hook fired by the resource pool when a shared adapter’s last reference detaches (or at session shutdown). Default: no-op — drop is enough for adapters whose underlying driver closes synchronously in its destructor. Read more
Source§

fn accessor_payload(&self) -> Option<Arc<dyn Any + Send + Sync>>

SRD-104 — the adapter’s accessor payload: a type-erased handle (Arc<dyn Any + Send + Sync>) a kernel node can obtain by fingerprint through its kernel tree’s resource scope (ResourceScope::lookup). The resource pool surfaces this through crate::resource_pool::SharedResource::accessor_payload (the pool-shared wrapper delegates here) and stores it on the entry at init. Default None — an adapter opts in only when it wants kernels to reach a live handle (the first consumer is the CQL session handle, SRD-103). Built over the adapter’s own connected session, so the payload and the op-execution path share one resource.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more