pub enum FunctionId {
Reducer(ReducerId),
Procedure(ProcedureId),
}Expand description
An id for a function exported from a module, which may be a reducer or a procedure.
Variants§
Reducer(ReducerId)
Procedure(ProcedureId)
Implementations§
Source§impl FunctionId
impl FunctionId
Sourcepub fn is_reducer(&self) -> bool
pub fn is_reducer(&self) -> bool
Returns true if this is a FunctionId::Reducer, otherwise false
Sourcepub fn as_reducer_mut(&mut self) -> Option<&mut ReducerId>
pub fn as_reducer_mut(&mut self) -> Option<&mut ReducerId>
Optionally returns mutable references to the inner fields if this is a FunctionId::Reducer, otherwise None
Sourcepub fn as_reducer(&self) -> Option<&ReducerId>
pub fn as_reducer(&self) -> Option<&ReducerId>
Optionally returns references to the inner fields if this is a FunctionId::Reducer, otherwise None
Sourcepub fn into_reducer(self) -> Result<ReducerId, Self>
pub fn into_reducer(self) -> Result<ReducerId, Self>
Returns the inner fields if this is a FunctionId::Reducer, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_procedure(&self) -> bool
pub fn is_procedure(&self) -> bool
Returns true if this is a FunctionId::Procedure, otherwise false
Sourcepub fn as_procedure_mut(&mut self) -> Option<&mut ProcedureId>
pub fn as_procedure_mut(&mut self) -> Option<&mut ProcedureId>
Optionally returns mutable references to the inner fields if this is a FunctionId::Procedure, otherwise None
Sourcepub fn as_procedure(&self) -> Option<&ProcedureId>
pub fn as_procedure(&self) -> Option<&ProcedureId>
Optionally returns references to the inner fields if this is a FunctionId::Procedure, otherwise None
Sourcepub fn into_procedure(self) -> Result<ProcedureId, Self>
pub fn into_procedure(self) -> Result<ProcedureId, Self>
Returns the inner fields if this is a FunctionId::Procedure, otherwise returns back the enum in the Err case of the result
Trait Implementations§
Source§impl Clone for FunctionId
impl Clone for FunctionId
Source§fn clone(&self) -> FunctionId
fn clone(&self) -> FunctionId
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FunctionId
impl Debug for FunctionId
impl Copy for FunctionId
Auto Trait Implementations§
impl Freeze for FunctionId
impl RefUnwindSafe for FunctionId
impl Send for FunctionId
impl Sync for FunctionId
impl Unpin for FunctionId
impl UnsafeUnpin for FunctionId
impl UnwindSafe for FunctionId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more