pub struct WirePolicy { /* private fields */ }Expand description
Closed record wire policy for one already selected protocol version.
The policy cannot be inferred from record-layer version bytes, so framing cannot negotiate, downgrade, or fall back between protocol versions.
ⓘ
let _ = brynja_protocol::WirePolicy {
version: brynja_core::ProtocolVersion::Tls13,
};Implementations§
Source§impl WirePolicy
impl WirePolicy
Sourcepub const fn for_version(version: ProtocolVersion) -> Self
pub const fn for_version(version: ProtocolVersion) -> Self
Binds framing to an externally selected typed protocol version.
Sourcepub const fn version(self) -> ProtocolVersion
pub const fn version(self) -> ProtocolVersion
Returns the externally selected version.
Sourcepub const fn reject_heartbeat_negotiation(
self,
extension_type: u16,
) -> Result<(), RecordError>
pub const fn reject_heartbeat_negotiation( self, extension_type: u16, ) -> Result<(), RecordError>
Rejects Heartbeat negotiation before extension state can be created.
Other extension codes are not admitted by this method; they merely remain outside this narrow exclusion check for their later owners.
Sourcepub fn admit_inner_content_type(
self,
code: ContentTypeCode,
) -> Result<ContentType, RecordError>
pub fn admit_inner_content_type( self, code: ContentTypeCode, ) -> Result<ContentType, RecordError>
Admits an already decrypted TLS 1.3 or DTLS 1.3 inner content type.
Heartbeat is rejected for both families. Earlier profiles have no
inner-content envelope and fail with RecordError::ProfileMismatch.
Trait Implementations§
Source§impl Clone for WirePolicy
impl Clone for WirePolicy
Source§fn clone(&self) -> WirePolicy
fn clone(&self) -> WirePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WirePolicy
Source§impl Debug for WirePolicy
impl Debug for WirePolicy
impl Eq for WirePolicy
Source§impl Hash for WirePolicy
impl Hash for WirePolicy
Source§impl PartialEq for WirePolicy
impl PartialEq for WirePolicy
impl StructuralPartialEq for WirePolicy
Auto Trait Implementations§
impl Freeze for WirePolicy
impl RefUnwindSafe for WirePolicy
impl Send for WirePolicy
impl Sync for WirePolicy
impl Unpin for WirePolicy
impl UnsafeUnpin for WirePolicy
impl UnwindSafe for WirePolicy
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