Struct reaper_medium::CommandId
source · [−]pub struct CommandId(_);
Expand description
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).
A command is a function that will be executed when a particular action is requested to be run. ↩
Implementations
sourceimpl CommandId
impl CommandId
sourcepub fn new(value: u32) -> CommandId
pub fn new(value: u32) -> CommandId
Creates a command ID.
Panics
This function panics if the given value is 0 (which is not a valid command ID).
sourcepub const unsafe fn new_unchecked(value: u32) -> CommandId
pub const unsafe fn new_unchecked(value: u32) -> CommandId
Creates a command ID without bound checking.
Safety
You must ensure that the given value is greater than 0.
Trait Implementations
sourceimpl Ord for CommandId
impl Ord for CommandId
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl PartialOrd<CommandId> for CommandId
impl PartialOrd<CommandId> for CommandId
sourcefn partial_cmp(&self, other: &CommandId) -> Option<Ordering>
fn partial_cmp(&self, other: &CommandId) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for CommandId
impl Eq for CommandId
impl StructuralEq for CommandId
impl StructuralPartialEq for CommandId
Auto Trait Implementations
impl RefUnwindSafe for CommandId
impl Send for CommandId
impl Sync for CommandId
impl Unpin for CommandId
impl UnwindSafe for CommandId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more