Trait mavlink::utils::RustDefault

source ·
pub trait RustDefault: Copy {
    // Required method
    fn rust_default() -> Self;
}
Expand description

A trait very similar to Default but is only implemented for the equivalent Rust types to MavTypes.

This is only needed because rust doesn’t currently implement Default for arrays of all sizes. In particular this trait is only ever used when the “serde” feature is enabled. For more information, check out this issue.

Required Methods§

source

fn rust_default() -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl RustDefault for char

source§

impl RustDefault for f32

source§

impl RustDefault for f64

source§

impl RustDefault for i8

source§

impl RustDefault for i16

source§

impl RustDefault for i32

source§

impl RustDefault for i64

source§

impl RustDefault for u8

source§

impl RustDefault for u16

source§

impl RustDefault for u32

source§

impl RustDefault for u64

source§

impl<T, const N: usize> RustDefault for [T; N]
where T: RustDefault,

Implementors§