pub struct WebSocketReviewPolicy { /* private fields */ }Expand description
Strict, bounded declaration for one isolated WebSocket connection.
Implementations§
Source§impl WebSocketReviewPolicy
impl WebSocketReviewPolicy
Sourcepub fn parse_json(
application_target: &Url,
source: &[u8],
) -> Result<Self, WebSocketReviewPolicyError>
pub fn parse_json( application_target: &Url, source: &[u8], ) -> Result<Self, WebSocketReviewPolicyError>
Parses strict JSON and validates it as a narrowing child of the exact
host, effective port, and application-path scope of application_target.
The two required true values are retained only as operator
assertions. Parsing does not independently verify authorization or
message side effects.
Sourcepub fn policy_reference(&self) -> &str
pub fn policy_reference(&self) -> &str
Returns the stable reference for the operator-versioned policy identity.
Sourcepub fn application_reference(&self) -> &str
pub fn application_reference(&self) -> &str
Returns the stable reference for the application authority scope.
Sourcepub fn endpoint_reference(&self) -> &str
pub fn endpoint_reference(&self) -> &str
Returns the stable reference for the exact WebSocket endpoint.
Sourcepub fn message_count(&self) -> usize
pub fn message_count(&self) -> usize
Returns the number of ordered outbound declarations.
Sourcepub fn messages(
&self,
) -> impl ExactSizeIterator<Item = WebSocketReviewMessageRef<'_>>
pub fn messages( &self, ) -> impl ExactSizeIterator<Item = WebSocketReviewMessageRef<'_>>
Returns value-free metadata for the ordered message declarations.
Sourcepub const fn origin_mode(&self) -> WebSocketOriginMode
pub const fn origin_mode(&self) -> WebSocketOriginMode
Returns the selected Origin-header behavior.
Sourcepub const fn has_subprotocol(&self) -> bool
pub const fn has_subprotocol(&self) -> bool
Reports whether one validated subprotocol token is present without exposing the operator-authored token.
Returns the required, unverified operator authorization assertion.
Sourcepub const fn messages_read_only_acknowledged(&self) -> bool
pub const fn messages_read_only_acknowledged(&self) -> bool
Returns the required, unverified read-only-message acknowledgement.
Sourcepub const fn message_content_is_non_secret(&self) -> bool
pub const fn message_content_is_non_secret(&self) -> bool
Returns the required operator assertion that message bodies are not secrets.
Sourcepub const fn compression_enabled(&self) -> bool
pub const fn compression_enabled(&self) -> bool
V1 always disables WebSocket extension negotiation.
Sourcepub const fn reconnect_enabled(&self) -> bool
pub const fn reconnect_enabled(&self) -> bool
V1 always owns exactly one connection attempt and never reconnects.
Sourcepub const fn limits(&self) -> WebSocketReviewLimits
pub const fn limits(&self) -> WebSocketReviewLimits
Returns all validated finite runtime ceilings.
Sourcepub const fn max_inbound_message_bytes(&self) -> u64
pub const fn max_inbound_message_bytes(&self) -> u64
Maximum bytes in one inbound application message.
Sourcepub const fn max_outbound_message_bytes(&self) -> u64
pub const fn max_outbound_message_bytes(&self) -> u64
Maximum bytes in one outbound application message.
Sourcepub const fn max_messages(&self) -> u16
pub const fn max_messages(&self) -> u16
Shared directional application-message count ceiling.
Sourcepub const fn max_control_frames(&self) -> u16
pub const fn max_control_frames(&self) -> u16
Connection-wide control-frame count ceiling.
Sourcepub const fn max_wall_time_ms(&self) -> u64
pub const fn max_wall_time_ms(&self) -> u64
Wall-clock ceiling in whole milliseconds.
Trait Implementations§
Source§impl Clone for WebSocketReviewPolicy
impl Clone for WebSocketReviewPolicy
Source§fn clone(&self) -> WebSocketReviewPolicy
fn clone(&self) -> WebSocketReviewPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WebSocketReviewPolicy
impl Debug for WebSocketReviewPolicy
impl Eq for WebSocketReviewPolicy
Source§impl PartialEq for WebSocketReviewPolicy
impl PartialEq for WebSocketReviewPolicy
impl StructuralPartialEq for WebSocketReviewPolicy
Auto Trait Implementations§
impl Freeze for WebSocketReviewPolicy
impl RefUnwindSafe for WebSocketReviewPolicy
impl Send for WebSocketReviewPolicy
impl Sync for WebSocketReviewPolicy
impl Unpin for WebSocketReviewPolicy
impl UnsafeUnpin for WebSocketReviewPolicy
impl UnwindSafe for WebSocketReviewPolicy
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.