pub enum ExtractError {
TooShortForHeader {
got: usize,
},
NotAPacketMessage {
message_type: u32,
},
DataOutOfRange {
abs_offset: usize,
data_len: usize,
recv_len: usize,
},
FrameTooShort {
got: usize,
},
}Expand description
抽出失敗の理由。呼び出し側が握り潰さず記録できるよう型で返す。
Variants§
TooShortForHeader
RNDIS ヘッダに満たない。
NotAPacketMessage
パケットメッセージ以外(制御メッセージ等)。エラーではないが無視する。
DataOutOfRange
データ位置・長さが受信バイト数を超えている(壊れたヘッダ)。
FrameTooShort
抽出できたが Ethernet フレームとして短すぎる。
Trait Implementations§
Source§impl Clone for ExtractError
impl Clone for ExtractError
Source§fn clone(&self) -> ExtractError
fn clone(&self) -> ExtractError
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 ExtractError
Source§impl Debug for ExtractError
impl Debug for ExtractError
impl Eq for ExtractError
Source§impl PartialEq for ExtractError
impl PartialEq for ExtractError
Source§fn eq(&self, other: &ExtractError) -> bool
fn eq(&self, other: &ExtractError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExtractError
Auto Trait Implementations§
impl Freeze for ExtractError
impl RefUnwindSafe for ExtractError
impl Send for ExtractError
impl Sync for ExtractError
impl Unpin for ExtractError
impl UnsafeUnpin for ExtractError
impl UnwindSafe for ExtractError
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
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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.