Skip to main content

QCParams

Trait QCParams 

Source
pub trait QCParams: Debug {
    type Error: Into<Error>;

    // Required methods
    fn count(&self) -> usize;
    fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>;
}
Expand description

The type of values that can be used as arguments to a QuakeC function. Implemented for tuples up to 8 elements (the maximum number of arguments supported by the vanilla Quake engine).

Required Associated Types§

Source

type Error: Into<Error>

The error returned by QCParams::nth.

Required Methods§

Source

fn count(&self) -> usize

Get the number of parameters available

Source

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Get the nth argument, specified by index.

Implementations on Foreign Types§

Source§

impl QCParams for ()

Source§

type Error = Infallible

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Source§

impl<A, B, C, D, E, F, G, H> QCParams for (A, B, C, D, E, F, G, H)

Source§

type Error = Error

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Source§

impl<B, C, D, E, F, G, H> QCParams for (B, C, D, E, F, G, H)

Source§

type Error = Error

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Source§

impl<C, D, E, F, G, H> QCParams for (C, D, E, F, G, H)

Source§

type Error = Error

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Source§

impl<D, E, F, G, H> QCParams for (D, E, F, G, H)

Source§

type Error = Error

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Source§

impl<E, F, G, H> QCParams for (E, F, G, H)

Source§

type Error = Error

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Source§

impl<F, G, H> QCParams for (F, G, H)

Source§

type Error = Error

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Source§

impl<G, H> QCParams for (G, H)
where G: Clone + Debug + TryInto<Value>, G::Error: Into<Error>, H: Clone + Debug + TryInto<Value>, H::Error: Into<Error>,

Source§

type Error = Error

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Source§

impl<H> QCParams for (H,)
where H: Clone + Debug + TryInto<Value>, H::Error: Into<Error>,

Source§

type Error = Error

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Source§

impl<T> QCParams for VecDeque<T>
where T: Clone + Debug + TryInto<Value>, <T as TryInto<Value>>::Error: Into<Error>,

Source§

type Error = <T as TryInto<Value>>::Error

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Source§

impl<T> QCParams for Vec<T>
where T: Clone + Debug + TryInto<Value>, <T as TryInto<Value>>::Error: Into<Error>,

Source§

type Error = <T as TryInto<Value>>::Error

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Source§

impl<T> QCParams for FixedBumpVec<'_, T>
where T: Clone + Debug + TryInto<Value>, <T as TryInto<Value>>::Error: Into<Error>,

Source§

type Error = <T as TryInto<Value>>::Error

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Source§

impl<T, const COUNT: usize> QCParams for ArrayVec<T, COUNT>
where T: Clone + Debug + TryInto<Value>, <T as TryInto<Value>>::Error: Into<Error>,

Source§

type Error = <T as TryInto<Value>>::Error

Source§

fn count(&self) -> usize

Source§

fn nth(&self, index: usize) -> Result<Value, ArgError<Self::Error>>

Implementors§