gstreamer::format

Type Alias Time

Source
pub type Time = ClockTime;

Aliased Type§

struct Time(u64);

Fields§

§0: u64

Implementations

Source§

impl ClockTime

Source

pub const SECOND: ClockTime

Source

pub const MSECOND: ClockTime

Source

pub const USECOND: ClockTime

Source

pub const NSECOND: ClockTime

Source

pub const MAX: ClockTime

Source

pub const fn hours(self) -> u64

Source

pub const fn minutes(self) -> u64

Source

pub const fn seconds(self) -> u64

Source

pub fn seconds_f32(self) -> f32

Source

pub fn seconds_f64(self) -> f64

Source

pub const fn mseconds(self) -> u64

Source

pub const fn useconds(self) -> u64

Source

pub const fn nseconds(self) -> u64

Source

pub const fn from_seconds(seconds: u64) -> Self

Builds a new ClockTime which value is the given number of seconds.

§Panics

Panics if the resulting duration in nanoseconds exceeds the u64 range.

Source

pub fn try_from_seconds_f32(seconds: f32) -> Result<Self, TryFromFloatSecsError>

Builds a new ClockTime which value is the given number of seconds.

Returns an error if seconds is negative, infinite or NaN, or the resulting duration in nanoseconds exceeds the u64 range.

Source

pub fn from_seconds_f32(seconds: f32) -> Self

Builds a new ClockTime which value is the given number of seconds.

§Panics

Panics if seconds is negative, infinite or NaN, or the resulting duration in nanoseconds exceeds the u64 range.

Source

pub fn try_from_seconds_f64(seconds: f64) -> Result<Self, TryFromFloatSecsError>

Builds a new ClockTime which value is the given number of seconds.

Returns an error if seconds is negative, infinite or NaN, or the resulting duration in nanoseconds exceeds the u64 range.

Source

pub fn from_seconds_f64(seconds: f64) -> Self

Builds a new ClockTime which value is the given number of seconds.

§Panics

Panics if seconds is negative, infinite or NaN, or the resulting duration in nanoseconds exceeds the u64 range.

Source

pub const fn from_mseconds(mseconds: u64) -> Self

Builds a new ClockTime which value is the given number of milliseconds.

§Panics

Panics if the resulting duration in nanoseconds exceeds the u64 range.

Source

pub const fn from_useconds(useconds: u64) -> Self

Builds a new ClockTime which value is the given number of microseconds.

§Panics

Panics if the resulting duration in nanoseconds exceeds the u64 range.

Source

pub const fn from_nseconds(nseconds: u64) -> Self

Builds a new ClockTime which value is the given number of nanoseconds.

§Panics

Panics if the requested duration equals GST_CLOCK_TIME_NONE (u64::MAX).

Source§

impl ClockTime

Source

pub const ZERO: Self

Source

pub const NONE: Option<Self> = None

Source

pub const ONE: Self

The unitary value.

Source

pub const MAX_SIGNED: Signed<ClockTime>

Source

pub const MIN_SIGNED: Signed<ClockTime>

Source

pub const fn is_zero(self) -> bool

Source§

impl ClockTime

Source

pub const fn checked_add(self, rhs: Self) -> Option<Self>

Source

pub const fn saturating_add(self, rhs: Self) -> Self

Source

pub fn overflowing_add(self, rhs: Self) -> (Self, bool)

Source

pub fn wrapping_add(self, rhs: Self) -> Self

Source

pub const fn checked_sub(self, rhs: Self) -> Option<Self>

Source

pub const fn saturating_sub(self, rhs: Self) -> Self

Source

pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool)

Source

pub const fn wrapping_sub(self, rhs: Self) -> Self

Source

pub fn absdiff(self, rhs: Self) -> Self

Source§

impl ClockTime

Source

pub const fn checked_div(self, rhs: u64) -> Option<Self>

Source

pub const fn saturating_div(self, rhs: u64) -> Self

Source

pub const fn checked_mul(self, rhs: u64) -> Option<Self>

Source

pub const fn saturating_mul(self, rhs: u64) -> Self

Source

pub fn overflowing_mul(self, rhs: u64) -> (Self, bool)

Source

pub fn wrapping_mul(self, rhs: u64) -> Self

Source

pub const fn checked_rem(self, rhs: u64) -> Option<Self>

Trait Implementations

Source§

impl Add<Signed<ClockTime>> for ClockTime

Source§

type Output = Signed<ClockTime>

The resulting type after applying the + operator.
Source§

fn add(self, other: Signed<ClockTime>) -> Signed<ClockTime>

Performs the + operation. Read more
Source§

impl Add for ClockTime

Source§

type Output = ClockTime

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ClockTime) -> Self

Performs the + operation. Read more
Source§

impl AddAssign for ClockTime

Source§

fn add_assign(&mut self, rhs: ClockTime)

Performs the += operation. Read more
Source§

impl AsRef<u64> for ClockTime

Source§

fn as_ref(&self) -> &u64

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for ClockTime

Source§

fn clone(&self) -> ClockTime

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ClockTime

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ClockTime

Source§

fn default() -> ClockTime

Returns the “default value” for a type. Read more
Source§

impl Deref for ClockTime

Source§

type Target = u64

The resulting type after dereferencing.
Source§

fn deref(&self) -> &u64

Dereferences the value.
Source§

impl Display for ClockTime

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Displayable for ClockTime

Source§

impl Div<u64> for ClockTime

Source§

type Output = ClockTime

The resulting type after applying the / operator.
Source§

fn div(self, rhs: u64) -> Self

Performs the / operation. Read more
Source§

impl Div for ClockTime

Source§

type Output = u64

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ClockTime) -> u64

Performs the / operation. Read more
Source§

impl DivAssign<u64> for ClockTime

Source§

fn div_assign(&mut self, rhs: u64)

Performs the /= operation. Read more
Source§

impl FormattedValue for ClockTime

Source§

type FullRange = Option<ClockTime>

Type which allows building a FormattedValue of this format from any raw value.
Source§

fn default_format() -> Format

Source§

fn format(&self) -> Format

Source§

fn is_some(&self) -> bool

Returns true if this FormattedValue represents a defined value.
Source§

unsafe fn into_raw_value(self) -> i64

Source§

fn is_none(&self) -> bool

Returns true if this FormattedValue represents an undefined value.
Source§

impl FromValue<'_> for ClockTime

Source§

type Checker = ClockTimeValueTypeOrNoneChecker

Value type checker.
Source§

unsafe fn from_value(value: &Value) -> ClockTime

Get the contained value from a Value. Read more
Source§

impl HasParamSpec for ClockTime

Source§

type ParamSpec = ParamSpecUInt64

Source§

type SetValue = ClockTime

Preferred value to be used as setter for the associated ParamSpec.
Source§

type BuilderFn = fn(_: &str) -> ParamSpecUInt64Builder<'_>

Source§

fn param_spec_builder() -> Self::BuilderFn

Source§

impl Hash for ClockTime

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Mul<u64> for ClockTime

Source§

type Output = ClockTime

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u64) -> Self

Performs the * operation. Read more
Source§

impl MulAssign<u64> for ClockTime

Source§

fn mul_assign(&mut self, rhs: u64)

Performs the *= operation. Read more
Source§

impl MulDiv<u64> for ClockTime

Source§

type Output = ClockTime

Output type for the methods of this trait.
Source§

fn mul_div_floor(self, num: u64, denom: u64) -> Option<Self>

Calculates floor(val * num / denom), i.e. the largest integer less than or equal to the result of the division. Read more
Source§

fn mul_div_round(self, num: u64, denom: u64) -> Option<Self>

Calculates round(val * num / denom), i.e. the closest integer to the result of the division. If both surrounding integers are the same distance (x.5), the one with the bigger absolute value is returned (round away from 0.0). Read more
Source§

fn mul_div_ceil(self, num: u64, denom: u64) -> Option<Self>

Calculates ceil(val * num / denom), i.e. the the smallest integer greater than or equal to the result of the division. Read more
Source§

impl OptionCheckedAdd<Signed<ClockTime>> for ClockTime

Source§

type Output = Signed<ClockTime>

The resulting inner type after applying the addition.
Source§

fn opt_checked_add( self, rhs: Signed<ClockTime>, ) -> Result<Option<Self::Output>, Error>

Computes the checked addition. Read more
Source§

impl OptionCheckedAdd for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the addition.
Source§

fn opt_checked_add(self, rhs: Self) -> Result<Option<Self>, Error>

Computes the checked addition. Read more
Source§

impl OptionCheckedDiv<u64> for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the division.
Source§

fn opt_checked_div(self, rhs: u64) -> Result<Option<Self>, Error>

Computes the checked division. Read more
Source§

impl OptionCheckedDiv for ClockTime

Source§

type Output = u64

The resulting inner type after applying the division.
Source§

fn opt_checked_div(self, rhs: Self) -> Result<Option<u64>, Error>

Computes the checked division. Read more
Source§

impl OptionCheckedMul<u64> for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the multiplication.
Source§

fn opt_checked_mul(self, rhs: u64) -> Result<Option<Self>, Error>

Computes the checked multiplication. Read more
Source§

impl OptionCheckedRem<u64> for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the remainder.
Source§

fn opt_checked_rem(self, rhs: u64) -> Result<Option<Self>, Error>

Computes the checked remainder. Read more
Source§

impl OptionCheckedRem for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the remainder.
Source§

fn opt_checked_rem(self, rhs: Self) -> Result<Option<Self>, Error>

Computes the checked remainder. Read more
Source§

impl OptionCheckedSub<Signed<ClockTime>> for ClockTime

Source§

type Output = Signed<ClockTime>

The resulting inner type after applying the substraction.
Source§

fn opt_checked_sub( self, rhs: Signed<ClockTime>, ) -> Result<Option<Self::Output>, Error>

Computes the checked substraction. Read more
Source§

impl OptionCheckedSub for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the substraction.
Source§

fn opt_checked_sub(self, rhs: Self) -> Result<Option<Self>, Error>

Computes the checked substraction. Read more
Source§

impl OptionOverflowingAdd for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the addition.
Source§

fn opt_overflowing_add(self, rhs: Self) -> Option<(Self, bool)>

Returns a tuple of the addition along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then self is returned. Read more
Source§

impl OptionOverflowingMul<u64> for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the multiplication.
Source§

fn opt_overflowing_mul(self, rhs: u64) -> Option<(Self, bool)>

Returns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then self is returned. Read more
Source§

impl OptionOverflowingSub for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the substraction.
Source§

fn opt_overflowing_sub(self, rhs: Self) -> Option<(Self, bool)>

Returns a tuple of the substraction along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then self is returned. Read more
Source§

impl OptionSaturatingAdd<Signed<ClockTime>> for ClockTime

Source§

type Output = Signed<ClockTime>

The resulting inner type after applying the addition.
Source§

fn opt_saturating_add(self, rhs: Signed<ClockTime>) -> Option<Self::Output>

Computes the addition saturating at the numeric bounds instead of overflowing. Read more
Source§

impl OptionSaturatingAdd for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the addition.
Source§

fn opt_saturating_add(self, rhs: Self) -> Option<Self>

Computes the addition saturating at the numeric bounds instead of overflowing. Read more
Source§

impl OptionSaturatingMul<u64> for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the multiplication.
Source§

fn opt_saturating_mul(self, rhs: u64) -> Option<Self>

Computes the multiplication saturating at the numeric bounds instead of overflowing. Read more
Source§

impl OptionSaturatingSub<Signed<ClockTime>> for ClockTime

Source§

type Output = Signed<ClockTime>

The resulting inner type after applying the substraction.
Source§

fn opt_saturating_sub(self, rhs: Signed<ClockTime>) -> Option<Self::Output>

Computes the substraction saturating at the numeric bounds instead of overflowing. Read more
Source§

impl OptionSaturatingSub for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the substraction.
Source§

fn opt_saturating_sub(self, rhs: Self) -> Option<Self>

Computes the substraction saturating at the numeric bounds instead of overflowing. Read more
Source§

impl OptionWrappingAdd for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the addition.
Source§

fn opt_wrapping_add(self, rhs: Self) -> Option<Self>

Computes the addition wrapping at the numeric bounds instead of overflowing. Read more
Source§

impl OptionWrappingMul<u64> for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the multiplication.
Source§

fn opt_wrapping_mul(self, rhs: u64) -> Option<Self>

Computes the multiplication wrapping at the numeric bounds instead of overflowing. Read more
Source§

impl OptionWrappingSub for ClockTime

Source§

type Output = ClockTime

The resulting inner type after applying the substraction.
Source§

fn opt_wrapping_sub(self, rhs: Self) -> Option<Self>

Computes the substraction wrapping at the numeric bounds instead of overflowing. Read more
Source§

impl Ord for ClockTime

Source§

fn cmp(&self, other: &ClockTime) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<Signed<ClockTime>> for ClockTime

Source§

fn eq(&self, other: &Signed<ClockTime>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for ClockTime

Source§

fn eq(&self, other: &ClockTime) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd<Signed<ClockTime>> for ClockTime

Source§

fn partial_cmp(&self, other: &Signed<ClockTime>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd for ClockTime

Source§

fn partial_cmp(&self, other: &ClockTime) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Rem<u64> for ClockTime

Source§

type Output = ClockTime

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: u64) -> Self

Performs the % operation. Read more
Source§

impl Rem for ClockTime

Source§

type Output = ClockTime

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self

Performs the % operation. Read more
Source§

impl RemAssign<u64> for ClockTime

Source§

fn rem_assign(&mut self, rhs: u64)

Performs the %= operation. Read more
Source§

impl Sub<Signed<ClockTime>> for ClockTime

Source§

type Output = Signed<ClockTime>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Signed<ClockTime>) -> Signed<ClockTime>

Performs the - operation. Read more
Source§

impl Sub for ClockTime

Source§

type Output = ClockTime

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ClockTime) -> Self

Performs the - operation. Read more
Source§

impl SubAssign for ClockTime

Source§

fn sub_assign(&mut self, rhs: ClockTime)

Performs the -= operation. Read more
Source§

impl Sum for ClockTime

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl ToValue for ClockTime

Source§

fn to_value(&self) -> Value

Convert a value to a Value.
Source§

fn value_type(&self) -> Type

Returns the type identifier of self. Read more
Source§

impl ToValueOptional for ClockTime

Source§

fn to_value_optional(opt: Option<&Self>) -> Value

Convert an Option to a Value.
Source§

impl TryFrom<Duration> for ClockTime

Source§

type Error = DurationError

The type returned in the event of a conversion error.
Source§

fn try_from(d: Duration) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u64> for ClockTime

Source§

type Error = GlibNoneError

The type returned in the event of a conversion error.
Source§

fn try_from(v: u64) -> Result<Self, GlibNoneError>

Performs the conversion.
Source§

impl TryFromGlib<i64> for ClockTime

Source§

impl UnsignedIntoSigned for ClockTime

Source§

type Signed = Signed<ClockTime>

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.
Source§

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

Converts self into a Signed matching the given sign.
Source§

impl ValueType for ClockTime

Source§

type Type = ClockTime

Type to get the Type from. Read more
Source§

impl Copy for ClockTime

Source§

impl Eq for ClockTime

Source§

impl FormattedValueIntrinsic for ClockTime

Source§

impl OptionOperations for ClockTime

Source§

impl SignedIntrinsic for ClockTime

Source§

impl SpecificFormattedValue for ClockTime

Source§

impl SpecificFormattedValueIntrinsic for ClockTime

Source§

impl StructuralPartialEq for ClockTime