Extend

Trait Extend 

Source
pub trait Extend<T>: Sized {
    // Required method
    fn extend(self) -> T;
}
Expand description

Generic extension

This type performs either a zero extend or a sign extend, depending if the type is signed.

Required Methods§

Source

fn extend(self) -> T

Extends this type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Extend<i16> for i8

Source§

fn extend(self) -> i16

Source§

impl Extend<i32> for i8

Source§

fn extend(self) -> i32

Source§

impl Extend<i32> for i16

Source§

fn extend(self) -> i32

Source§

impl Extend<i64> for i8

Source§

fn extend(self) -> i64

Source§

impl Extend<i64> for i16

Source§

fn extend(self) -> i64

Source§

impl Extend<i64> for i32

Source§

fn extend(self) -> i64

Source§

impl Extend<i128> for i8

Source§

fn extend(self) -> i128

Source§

impl Extend<i128> for i16

Source§

fn extend(self) -> i128

Source§

impl Extend<i128> for i32

Source§

fn extend(self) -> i128

Source§

impl Extend<i128> for i64

Source§

fn extend(self) -> i128

Source§

impl Extend<u16> for u8

Source§

fn extend(self) -> u16

Source§

impl Extend<u32> for u8

Source§

fn extend(self) -> u32

Source§

impl Extend<u32> for u16

Source§

fn extend(self) -> u32

Source§

impl Extend<u64> for u8

Source§

fn extend(self) -> u64

Source§

impl Extend<u64> for u16

Source§

fn extend(self) -> u64

Source§

impl Extend<u64> for u32

Source§

fn extend(self) -> u64

Source§

impl Extend<u128> for u8

Source§

fn extend(self) -> u128

Source§

impl Extend<u128> for u16

Source§

fn extend(self) -> u128

Source§

impl Extend<u128> for u32

Source§

fn extend(self) -> u128

Source§

impl Extend<u128> for u64

Source§

fn extend(self) -> u128

Source§

impl<'a> Extend<i16> for &'a i8
where i8: Extend<i16>,

Source§

fn extend(self) -> i16

Source§

impl<'a> Extend<i32> for &'a i8
where i8: Extend<i32>,

Source§

fn extend(self) -> i32

Source§

impl<'a> Extend<i32> for &'a i16
where i16: Extend<i32>,

Source§

fn extend(self) -> i32

Source§

impl<'a> Extend<i64> for &'a i8
where i8: Extend<i64>,

Source§

fn extend(self) -> i64

Source§

impl<'a> Extend<i64> for &'a i16
where i16: Extend<i64>,

Source§

fn extend(self) -> i64

Source§

impl<'a> Extend<i64> for &'a i32
where i32: Extend<i64>,

Source§

fn extend(self) -> i64

Source§

impl<'a> Extend<i128> for &'a i8
where i8: Extend<i128>,

Source§

fn extend(self) -> i128

Source§

impl<'a> Extend<i128> for &'a i16
where i16: Extend<i128>,

Source§

fn extend(self) -> i128

Source§

impl<'a> Extend<i128> for &'a i32
where i32: Extend<i128>,

Source§

fn extend(self) -> i128

Source§

impl<'a> Extend<i128> for &'a i64
where i64: Extend<i128>,

Source§

fn extend(self) -> i128

Source§

impl<'a> Extend<u16> for &'a u8
where u8: Extend<u16>,

Source§

fn extend(self) -> u16

Source§

impl<'a> Extend<u32> for &'a u8
where u8: Extend<u32>,

Source§

fn extend(self) -> u32

Source§

impl<'a> Extend<u32> for &'a u16
where u16: Extend<u32>,

Source§

fn extend(self) -> u32

Source§

impl<'a> Extend<u64> for &'a u8
where u8: Extend<u64>,

Source§

fn extend(self) -> u64

Source§

impl<'a> Extend<u64> for &'a u16
where u16: Extend<u64>,

Source§

fn extend(self) -> u64

Source§

impl<'a> Extend<u64> for &'a u32
where u32: Extend<u64>,

Source§

fn extend(self) -> u64

Source§

impl<'a> Extend<u128> for &'a u8
where u8: Extend<u128>,

Source§

fn extend(self) -> u128

Source§

impl<'a> Extend<u128> for &'a u16
where u16: Extend<u128>,

Source§

fn extend(self) -> u128

Source§

impl<'a> Extend<u128> for &'a u32
where u32: Extend<u128>,

Source§

fn extend(self) -> u128

Source§

impl<'a> Extend<u128> for &'a u64
where u64: Extend<u128>,

Source§

fn extend(self) -> u128

Implementors§

Source§

impl<T> Extend<T> for T

Extending to the same type simply returns it