# [−] [src] Trait serialization::Serializable

    pub trait Serializable {
        fn serialize(&self, s: &mut Stream);

        fn serialized_size(&self) -> usize
        where
            Self: Sized,
        { ... }
        fn serialized_size_with_flags(&self, flags: u32) -> usize
        where
            Self: Sized,
        { ... }
    }

## Required Methods

### `fn serialize(&self, s: &mut Stream)`

Serialize the struct and appends it to the end of stream.

## Provided Methods

### `fn serialized_size(&self) -> usize where
Self: Sized,`

Hint about the size of serialized struct.

### `fn serialized_size_with_flags(&self, flags: u32) -> usize where
Self: Sized,`

Hint about the size of serialized struct with given flags.

## Implementations on Foreign Types

###

`impl Serializable for bool`

[src]

####

`fn serialize(&self, s: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for i32`

[src]

####

`fn serialize(&self, s: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for i64`

[src]

####

`fn serialize(&self, s: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for u8`

[src]

####

`fn serialize(&self, s: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for u16`

[src]

####

`fn serialize(&self, s: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for u32`

[src]

####

`fn serialize(&self, s: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for u64`

[src]

####

`fn serialize(&self, s: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for String`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl<'a> Serializable for &'a str`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

## Implementors

###

`impl Serializable for Bytes`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for Compact`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize where Self: Sized,`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for H160`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for H256`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for H264`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for H32`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for H48`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for H512`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for H520`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for H96`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl Serializable for CompactInteger`

[src]

####

`fn serialize(&self, stream: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

###

`impl<S> Serializable for List<S> where S: Serializable,`

[src]

####

`fn serialize(&self, s: &mut Stream)`

[src]

####

`fn serialized_size(&self) -> usize where Self: Sized,`

[src]

####

`fn serialized_size_with_flags(&self, flags: u32) -> usize where Self: Sized,`

[src]

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)