Skip to main content

Ports

Struct Ports 

Source
pub struct Ports {
    pub compressor: Box<dyn PromptCompressor>,
    pub grammar: Box<dyn GrammarMasker>,
    pub safety: Box<dyn SafetySteerer>,
    pub guard: Option<Box<dyn ChunkGuard>>,
    pub ingress: Option<Box<dyn ChunkGuard>>,
    pub relay: Option<Box<dyn HybridRelay>>,
}
Expand description

The collaborator ports bound to a session. relay is None by default — air-gapped.

Fields§

§compressor: Box<dyn PromptCompressor>§grammar: Box<dyn GrammarMasker>§safety: Box<dyn SafetySteerer>§guard: Option<Box<dyn ChunkGuard>>

Optional chunk guard for the checkpointed-rollback control loop (ADR-012). None runs the plain single-pass decode.

§ingress: Option<Box<dyn ChunkGuard>>

Optional ingress / prompt-risk triage (ADR-013): scores the prompt before generation. Reuses the ChunkGuard contract — it scores a token window for risk — applied to the prompt rather than the output. None runs no ingress check.

§relay: Option<Box<dyn HybridRelay>>

Implementations§

Source§

impl Ports

Source

pub fn permissive() -> Self

Defaults: identity compression, all-tokens-allowed grammar, no safety steering, no guard, no ingress, no relay (air-gapped).

Auto Trait Implementations§

§

impl !RefUnwindSafe for Ports

§

impl !Send for Ports

§

impl !Sync for Ports

§

impl !UnwindSafe for Ports

§

impl Freeze for Ports

§

impl Unpin for Ports

§

impl UnsafeUnpin for Ports

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