Struct wmproxy::ProtFrameHeader
source · pub struct ProtFrameHeader {
pub length: u32,
/* private fields */
}
Expand description
协议相关头信息
Fields§
§length: u32
包体的长度, 3个字节, 最大为16m
Implementations§
source§impl ProtFrameHeader
impl ProtFrameHeader
pub const FRAME_HEADER_BYTES: usize = 12usize
pub fn new(kind: ProtKind, flag: ProtFlag, sock_map: u64) -> ProtFrameHeader
pub fn sock_map(&self) -> u64
pub fn flag(&self) -> ProtFlag
pub fn parse<T: Buf>(buffer: &mut T) -> ProxyResult<ProtFrameHeader>
pub fn parse_by_len<T: Buf>( buffer: &mut T, length: u32 ) -> ProxyResult<ProtFrameHeader>
pub fn encode<B: Buf + BufMut>(&self, buffer: &mut B) -> ProxyResult<usize>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ProtFrameHeader
impl Send for ProtFrameHeader
impl Sync for ProtFrameHeader
impl Unpin for ProtFrameHeader
impl UnwindSafe for ProtFrameHeader
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