[][src]Struct reaper_medium::CommandId

pub struct CommandId(_);

A command ID.

This uniquely identifies a command1 within a certain section. For built-in actions this command ID is completely stable. For actions added by extensions it should be assumed that the command ID is valid only within one REAPER session.

This is not to be confused with the command index (the position in the action list) and the command name (a globally unique string identifier for commands added by extensions which is stable even across different REAPER sessions).


  1. A command is a function that will be executed when a particular action is requested to be run. 

Implementations

impl CommandId[src]

pub fn new(value: u32) -> CommandId[src]

Creates a command ID.

Panics

This function panics if the given value is 0 (which is not a valid command ID).

pub const unsafe fn new_unchecked(value: u32) -> CommandId[src]

Creates a command ID without bound checking.

Safety

You must ensure that the given value is greater than 0.

pub const fn get(&self) -> u32[src]

Returns the wrapped value.

pub fn to_raw(&self) -> i32[src]

Converts this value to an integer as expected by the low-level API.

Trait Implementations

impl Clone for CommandId[src]

impl Copy for CommandId[src]

impl Debug for CommandId[src]

impl Default for CommandId[src]

impl Display for CommandId[src]

impl Eq for CommandId[src]

impl Hash for CommandId[src]

impl Ord for CommandId[src]

impl PartialEq<CommandId> for CommandId[src]

impl PartialOrd<CommandId> for CommandId[src]

impl StructuralEq for CommandId[src]

impl StructuralPartialEq for CommandId[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.