[−][src]Struct sbp::Be
A parser for parsing unsigned and signed integers, stored in big-endian.
Note that this type is frequently used in the sbp
macro, in that case it's an intermediate
type, since there normally is no type argument here.
Trait Implementations
impl<'a> Parser<'a, u8> for Be
[src]
type Error = BasicOutOfSpaceError
The error that the parsing can result in.
type Meta = ()
An arbitrary additional value provided, this will usually be ()
. When const generics comes, this probably won't be required. Read more
fn parse(_: Self::Meta, bytes: &'a [u8]) -> Result<(u8, usize), Self::Error>
[src]
impl<'a> Parser<'a, u16> for Be
[src]
type Error = BasicOutOfSpaceError
The error that the parsing can result in.
type Meta = ()
An arbitrary additional value provided, this will usually be ()
. When const generics comes, this probably won't be required. Read more
fn parse(_: Self::Meta, bytes: &'a [u8]) -> Result<(u16, usize), Self::Error>
[src]
impl<'a> Parser<'a, u32> for Be
[src]
type Error = BasicOutOfSpaceError
The error that the parsing can result in.
type Meta = ()
An arbitrary additional value provided, this will usually be ()
. When const generics comes, this probably won't be required. Read more
fn parse(_: Self::Meta, bytes: &'a [u8]) -> Result<(u32, usize), Self::Error>
[src]
impl<'a> Parser<'a, u64> for Be
[src]
type Error = BasicOutOfSpaceError
The error that the parsing can result in.
type Meta = ()
An arbitrary additional value provided, this will usually be ()
. When const generics comes, this probably won't be required. Read more
fn parse(_: Self::Meta, bytes: &'a [u8]) -> Result<(u64, usize), Self::Error>
[src]
impl<'a> Parser<'a, u128> for Be
[src]
type Error = BasicOutOfSpaceError
The error that the parsing can result in.
type Meta = ()
An arbitrary additional value provided, this will usually be ()
. When const generics comes, this probably won't be required. Read more
fn parse(_: Self::Meta, bytes: &'a [u8]) -> Result<(u128, usize), Self::Error>
[src]
impl<'a> Parser<'a, i8> for Be
[src]
type Error = BasicOutOfSpaceError
The error that the parsing can result in.
type Meta = ()
An arbitrary additional value provided, this will usually be ()
. When const generics comes, this probably won't be required. Read more
fn parse(_: Self::Meta, bytes: &'a [u8]) -> Result<(i8, usize), Self::Error>
[src]
impl<'a> Parser<'a, i16> for Be
[src]
type Error = BasicOutOfSpaceError
The error that the parsing can result in.
type Meta = ()
An arbitrary additional value provided, this will usually be ()
. When const generics comes, this probably won't be required. Read more
fn parse(_: Self::Meta, bytes: &'a [u8]) -> Result<(i16, usize), Self::Error>
[src]
impl<'a> Parser<'a, i32> for Be
[src]
type Error = BasicOutOfSpaceError
The error that the parsing can result in.
type Meta = ()
An arbitrary additional value provided, this will usually be ()
. When const generics comes, this probably won't be required. Read more
fn parse(_: Self::Meta, bytes: &'a [u8]) -> Result<(i32, usize), Self::Error>
[src]
impl<'a> Parser<'a, i64> for Be
[src]
type Error = BasicOutOfSpaceError
The error that the parsing can result in.
type Meta = ()
An arbitrary additional value provided, this will usually be ()
. When const generics comes, this probably won't be required. Read more
fn parse(_: Self::Meta, bytes: &'a [u8]) -> Result<(i64, usize), Self::Error>
[src]
impl<'a> Parser<'a, i128> for Be
[src]
type Error = BasicOutOfSpaceError
The error that the parsing can result in.
type Meta = ()
An arbitrary additional value provided, this will usually be ()
. When const generics comes, this probably won't be required. Read more
fn parse(_: Self::Meta, bytes: &'a [u8]) -> Result<(i128, usize), Self::Error>
[src]
impl<'a> Serializer<'a, u8> for Be
[src]
type Error = BasicOutOfSpaceError
The error that may occur when serializing.
type Meta = ()
An extra value provided, currently only meant and used for Take
.
fn serialize(
data: &u8,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
[src]
data: &u8,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
impl<'a> Serializer<'a, u16> for Be
[src]
type Error = BasicOutOfSpaceError
The error that may occur when serializing.
type Meta = ()
An extra value provided, currently only meant and used for Take
.
fn serialize(
data: &u16,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
[src]
data: &u16,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
impl<'a> Serializer<'a, u32> for Be
[src]
type Error = BasicOutOfSpaceError
The error that may occur when serializing.
type Meta = ()
An extra value provided, currently only meant and used for Take
.
fn serialize(
data: &u32,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
[src]
data: &u32,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
impl<'a> Serializer<'a, u64> for Be
[src]
type Error = BasicOutOfSpaceError
The error that may occur when serializing.
type Meta = ()
An extra value provided, currently only meant and used for Take
.
fn serialize(
data: &u64,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
[src]
data: &u64,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
impl<'a> Serializer<'a, u128> for Be
[src]
type Error = BasicOutOfSpaceError
The error that may occur when serializing.
type Meta = ()
An extra value provided, currently only meant and used for Take
.
fn serialize(
data: &u128,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
[src]
data: &u128,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
impl<'a> Serializer<'a, i8> for Be
[src]
type Error = BasicOutOfSpaceError
The error that may occur when serializing.
type Meta = ()
An extra value provided, currently only meant and used for Take
.
fn serialize(
data: &i8,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
[src]
data: &i8,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
impl<'a> Serializer<'a, i16> for Be
[src]
type Error = BasicOutOfSpaceError
The error that may occur when serializing.
type Meta = ()
An extra value provided, currently only meant and used for Take
.
fn serialize(
data: &i16,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
[src]
data: &i16,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
impl<'a> Serializer<'a, i32> for Be
[src]
type Error = BasicOutOfSpaceError
The error that may occur when serializing.
type Meta = ()
An extra value provided, currently only meant and used for Take
.
fn serialize(
data: &i32,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
[src]
data: &i32,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
impl<'a> Serializer<'a, i64> for Be
[src]
type Error = BasicOutOfSpaceError
The error that may occur when serializing.
type Meta = ()
An extra value provided, currently only meant and used for Take
.
fn serialize(
data: &i64,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
[src]
data: &i64,
_: Self::Meta,
bytes: &'a mut [u8]
) -> Result<usize, Self::Error>
impl<'a> Serializer<'a, i128> for Be
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,