pub struct SocketDefinition {
pub name: String,
pub protocol: String,
pub backpressure_credit: Option<i64>,
pub reconnect: bool,
pub legal_basis: Option<String>,
pub loc: Loc,
pub leading_trivia: Vec<Trivia>,
pub trailing_trivia: Vec<Trivia>,
}Expand description
socket Name { protocol: SessionRef, backpressure: credit(n), reconnect: cognitive_state, legal_basis: ... }
§Fase 41.b — the typed WebSocket transport (paper_websocket_cognitive_primitive.md).
socket is NOT the protocol — the protocol is a session it references by
name (protocol and transport kept separate but composable). The type checker
resolves protocol to a declared session (whose two roles are already
duality-checked via the §41.a algebra), so the dialogue carried over the WS
connection is conformant + deadlock-free by construction.
Fields§
§name: String§protocol: StringThe referenced session declaration’s name — the protocol.
backpressure_credit: Option<i64>The credit window of the typed-resource backpressure (credit(n));
None if unspecified. A 0 credit is rejected by the type checker.
reconnect: boolreconnect: cognitive_state → true (resume mid-dialogue via a sealed
§40.t snapshot); absent or reconnect: none → false.
legal_basis: Option<String>Optional legal_basis: annotation (enterprise audit/shield gate).
loc: Loc§leading_trivia: Vec<Trivia>Fase 14.b — leading comment trivia.
trailing_trivia: Vec<Trivia>Fase 14.b — trailing comment trivia.
Trait Implementations§
Source§impl Debug for SocketDefinition
impl Debug for SocketDefinition
Source§impl Default for SocketDefinition
impl Default for SocketDefinition
Source§fn default() -> SocketDefinition
fn default() -> SocketDefinition
Auto Trait Implementations§
impl Freeze for SocketDefinition
impl RefUnwindSafe for SocketDefinition
impl Send for SocketDefinition
impl Sync for SocketDefinition
impl Unpin for SocketDefinition
impl UnsafeUnpin for SocketDefinition
impl UnwindSafe for SocketDefinition
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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