pub struct TenantPolicyRuntime {
pub tenant_id: String,
/* private fields */
}Expand description
Tenant-scoped policy runtime. Construct once at startup, then share via Arc.
Fields§
§tenant_id: StringImplementations§
Source§impl TenantPolicyRuntime
impl TenantPolicyRuntime
pub fn new( tenant_id: String, max_frame_bytes: usize, policy: &TenantPolicy, ) -> Result<TenantPolicyRuntime, WsPrismError>
pub fn session_policy(&self) -> &SessionPolicy
pub fn hot_error_mode(&self) -> HotErrorMode
pub fn hot_requires_active_room(&self) -> bool
Sourcepub fn new_connection_limiter(&self) -> Option<ConnRateLimiter>
pub fn new_connection_limiter(&self) -> Option<ConnRateLimiter>
Create per-connection limiter if enabled (Connection/Both).
Sourcepub fn check_len(&self, bytes_len: usize) -> PolicyDecision
pub fn check_len(&self, bytes_len: usize) -> PolicyDecision
Cheap global checks for any inbound payload.
Sourcepub fn check_text(
&self,
bytes_len: usize,
svc: &str,
msg_type: &str,
) -> PolicyDecision
pub fn check_text( &self, bytes_len: usize, svc: &str, msg_type: &str, ) -> PolicyDecision
Ext Lane policy: svc/type allowlist + (optional) tenant-level rate limit.
Auto Trait Implementations§
impl Freeze for TenantPolicyRuntime
impl RefUnwindSafe for TenantPolicyRuntime
impl Send for TenantPolicyRuntime
impl Sync for TenantPolicyRuntime
impl Unpin for TenantPolicyRuntime
impl UnwindSafe for TenantPolicyRuntime
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