Struct rquickjs::function::ParamRequirement
source · pub struct ParamRequirement { /* private fields */ }
Expand description
A struct encoding the requirements of a parameter set.
Implementations§
source§impl ParamRequirement
impl ParamRequirement
sourcepub const fn single() -> ParamRequirement
pub const fn single() -> ParamRequirement
Returns the requirement of a single required parameter
sourcepub const fn exhaustive() -> ParamRequirement
pub const fn exhaustive() -> ParamRequirement
Makes the requirements exhaustive i.e. the parameter set requires that the function is called with no arguments than parameters
sourcepub const fn optional() -> ParamRequirement
pub const fn optional() -> ParamRequirement
Returns the requirements for a single optional parameter
sourcepub const fn any() -> ParamRequirement
pub const fn any() -> ParamRequirement
Returns the requirements for a any number of parameters
sourcepub const fn none() -> ParamRequirement
pub const fn none() -> ParamRequirement
Returns the requirements for no parameters
sourcepub const fn combine(self, other: ParamRequirement) -> ParamRequirement
pub const fn combine(self, other: ParamRequirement) -> ParamRequirement
Combine to requirements into one which covers both.
sourcepub fn is_exhaustive(&self) -> bool
pub fn is_exhaustive(&self) -> bool
Returns whether this function is required to be exhaustive called
i.e. there can be no more arguments then parameters.
Auto Trait Implementations§
impl RefUnwindSafe for ParamRequirement
impl Send for ParamRequirement
impl Sync for ParamRequirement
impl Unpin for ParamRequirement
impl UnwindSafe for ParamRequirement
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
Mutably borrows from an owned value. Read more