FromSong

Trait FromSong 

Source
pub trait FromSong: SongSize {
    // Required method
    fn from_song(buf: &[u8]) -> Result<Self, FromSongError>
       where Self: Sized;
}

Required Methods§

Source

fn from_song(buf: &[u8]) -> Result<Self, FromSongError>
where Self: Sized,

Deserialize from buf and return the deserialized struct and bytes read

Implementations on Foreign Types§

Source§

impl FromSong for bool

Source§

fn from_song(buf: &[u8]) -> Result<Self, FromSongError>
where Self: Sized,

Source§

impl FromSong for f32

Source§

impl FromSong for f64

Source§

impl FromSong for i8

Source§

impl FromSong for i16

Source§

impl FromSong for i32

Source§

impl FromSong for i64

Source§

impl FromSong for i128

Source§

impl FromSong for isize

Source§

impl FromSong for u8

Source§

impl FromSong for u16

Source§

impl FromSong for u32

Source§

impl FromSong for u64

Source§

impl FromSong for u128

Source§

impl FromSong for usize

Source§

impl<T: FromSong> FromSong for Option<T>

Source§

fn from_song(buf: &[u8]) -> Result<Self, FromSongError>
where Self: Sized,

Source§

impl<T: SongSize + FromSong, E: SongSize + FromSong> FromSong for Result<T, E>

Source§

fn from_song(buf: &[u8]) -> Result<Self, FromSongError>
where Self: Sized,

Source§

impl<T: SongSize + FromSong, const N: usize> FromSong for [T; N]

Source§

fn from_song(buf: &[u8]) -> Result<Self, FromSongError>
where Self: Sized,

Implementors§