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
impl Ports
Sourcepub fn permissive() -> Self
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> 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