[−][src]Enum koibumi_core::packet::PacketError
An error which can be returned when constructing a Bitmessage packet.
This error is used as the error type for
the Header::new()
and the Packet::new()
methods.
This error is also used as a error type wrapped by std::io::Error
for
the Header::read_from_with_config()
and the Packet::read_from_with_config()
methods.
Variants
The magic numbers did not match. The expected and the actual magic numbers are returned as payloads of this variant.
Fields of InvalidMagic
The length of the payload was too long to construct a packet. The maximum length allowed and the actual length supplied are returned as payloads of this variant.
The checksums did not match. The expected and the actual checksums are returned as payloads of this variant.
Fields of InvalidChecksum
The length provided by the header and the length of the actual payload did not match. The expected and the actual lengths of the payload are returned as payloads of this variant.
Trait Implementations
impl Clone for PacketError
[src]
pub fn clone(&self) -> PacketError
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PacketError
[src]
impl Display for PacketError
[src]
impl Eq for PacketError
[src]
impl Error for PacketError
[src]
pub fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
pub fn description(&self) -> &str
1.0.0[src]
pub fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl From<PacketError> for Error
[src]
pub fn from(err: PacketError) -> Self
[src]
impl PartialEq<PacketError> for PacketError
[src]
pub fn eq(&self, other: &PacketError) -> bool
[src]
pub fn ne(&self, other: &PacketError) -> bool
[src]
impl StructuralEq for PacketError
[src]
impl StructuralPartialEq for PacketError
[src]
Auto Trait Implementations
impl RefUnwindSafe for PacketError
[src]
impl Send for PacketError
[src]
impl Sync for PacketError
[src]
impl Unpin for PacketError
[src]
impl UnwindSafe for PacketError
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,