Skip to main content

NativeServiceDef

Struct NativeServiceDef 

Source
pub struct NativeServiceDef {
    pub name: &'static str,
    pub sensitive: bool,
    pub description: &'static str,
    pub parameters: Option<&'static str>,
    pub make: fn() -> Arc<dyn NativeService>,
}
Expand description

Native service declaration entry (declarative registration: adding a native capability = appending one entry to the plugin declaration table; the router, the capability inventory, and binding checks need zero changes).

name aligns with the governance-side service catalog seed; the shared source of truth is each family’s official_native_services.json, with two-sided guards locking drift.

Fields§

§name: &'static str

Globally unique service name (service_name of io_request; unique across families, locked when aggregated on the governance side).

§sensitive: bool

Whether the service touches credentials or sensitive data (aligned with governance-side catalog metadata).

§description: &'static str

One-line description (consumed by the capability inventory / docs).

§parameters: Option<&'static str>

Parameter contract (JSON Schema string in the OpenAI function parameters subset): None = no contract declared, the capability inventory omits parameters, and LLM consumers degrade to an empty schema (byte-for-byte identical to existing behavior, no silent semantic change). Adding a service = append an entry to this table; services with a fixed parameter surface should also declare parameters so the LLM side can generate the tool schema.

§make: fn() -> Arc<dyn NativeService>

Instance constructor (stateful services inject their default state here).

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> 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, 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.