pub struct StaticByteBuffer { /* private fields */ }Expand description
Immutable owned byte buffer with Arc-based sharing. Send + Sync - can be safely shared across threads. Used for cryptographic keys and other immutable data.
Implementations§
Trait Implementations§
Source§impl AsRef<[u8]> for StaticByteBuffer
impl AsRef<[u8]> for StaticByteBuffer
Source§impl ByteBuffer for StaticByteBuffer
impl ByteBuffer for StaticByteBuffer
Source§impl Clone for StaticByteBuffer
impl Clone for StaticByteBuffer
Source§fn clone(&self) -> StaticByteBuffer
fn clone(&self) -> StaticByteBuffer
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 moreSource§impl Debug for StaticByteBuffer
impl Debug for StaticByteBuffer
Source§impl Display for StaticByteBuffer
impl Display for StaticByteBuffer
impl Eq for StaticByteBuffer
Source§impl From<&StaticByteBuffer> for Vec<u8>
impl From<&StaticByteBuffer> for Vec<u8>
Source§fn from(val: &StaticByteBuffer) -> Self
fn from(val: &StaticByteBuffer) -> Self
Converts to this type from the input type.
Source§impl<const N: usize> From<&StaticByteBuffer> for [u8; N]
impl<const N: usize> From<&StaticByteBuffer> for [u8; N]
Source§fn from(val: &StaticByteBuffer) -> Self
fn from(val: &StaticByteBuffer) -> Self
Converts to this type from the input type.
Source§impl From<&[u8]> for StaticByteBuffer
impl From<&[u8]> for StaticByteBuffer
Source§impl From<StaticByteBuffer> for Vec<u8>
impl From<StaticByteBuffer> for Vec<u8>
Source§fn from(val: StaticByteBuffer) -> Self
fn from(val: StaticByteBuffer) -> Self
Converts to this type from the input type.
Source§impl Hash for StaticByteBuffer
impl Hash for StaticByteBuffer
Source§impl IdentityType for StaticByteBuffer
impl IdentityType for StaticByteBuffer
Source§impl PartialEq for StaticByteBuffer
impl PartialEq for StaticByteBuffer
impl Send for StaticByteBuffer
Source§impl ServerConnectionHandler<StaticByteBuffer> for DefaultServerConnectionHandler
impl ServerConnectionHandler<StaticByteBuffer> for DefaultServerConnectionHandler
Source§fn generate(&self, _initial_data: &[u8]) -> StaticByteBuffer
fn generate(&self, _initial_data: &[u8]) -> StaticByteBuffer
Derive a client session identity from the client’s decrypted initial data bytes.
Source§fn initial_data(&self, _identity: &StaticByteBuffer) -> StaticByteBuffer
fn initial_data(&self, _identity: &StaticByteBuffer) -> StaticByteBuffer
Produce initial data to include in the server handshake response for the given identity.
Source§fn verify_version(&self, version_bytes: &[u8]) -> bool
fn verify_version(&self, version_bytes: &[u8]) -> bool
Check whether the client version (from the handshake tailer ID field) is compatible.
Returns
true if the handshake should proceed, false if it should be rejected.
Implementations are responsible for any logging before returning.impl Sync for StaticByteBuffer
Auto Trait Implementations§
impl Freeze for StaticByteBuffer
impl RefUnwindSafe for StaticByteBuffer
impl Unpin for StaticByteBuffer
impl UnsafeUnpin for StaticByteBuffer
impl UnwindSafe for StaticByteBuffer
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