gstreamer::format

Trait UnsignedIntoSigned

Source
pub trait UnsignedIntoSigned: Copy + Sized {
    type Signed;

    // Required methods
    fn into_positive(self) -> Self::Signed;
    fn into_negative(self) -> Self::Signed;

    // Provided method
    fn into_signed(self, sign: i32) -> Self::Signed { ... }
}
Expand description

A trait implemented on unsigned types which can be converted into crate::Signeds.

Required Associated Types§

Required Methods§

Source

fn into_positive(self) -> Self::Signed

Converts self into a Signed::Positive.

Source

fn into_negative(self) -> Self::Signed

Converts self into a Signed::Negative.

Provided Methods§

Source

fn into_signed(self, sign: i32) -> Self::Signed

Converts self into a Signed matching the given sign.

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 UnsignedIntoSigned for Option<u32>

Source§

impl UnsignedIntoSigned for Option<u64>

Source§

impl UnsignedIntoSigned for Option<usize>

Source§

impl UnsignedIntoSigned for Option<Buffers>

Source§

impl UnsignedIntoSigned for Option<Bytes>

Source§

impl UnsignedIntoSigned for Option<ClockTime>

Source§

impl UnsignedIntoSigned for Option<Default>

Source§

impl UnsignedIntoSigned for Option<Other>

Source§

impl UnsignedIntoSigned for Option<Percent>

Source§

impl UnsignedIntoSigned for u32

Source§

impl UnsignedIntoSigned for u64

Source§

impl UnsignedIntoSigned for usize

Implementors§