Is there a way to create pseudo default function parameters in rust? I'd like to do something like
pub struct Circular<T> {
raw: Vec<T>,
current: u64
}
impl<T> Circular<T> {
pub fn new(t_raw: Vec<T>, t_current=0: u64) -> Circular<T> {
return Circular { raw: t_raw, current: t_current };
}
I'd like to have the option of settings the current
variable, but it won't always be needed to be set. Is this a possible thing to do in Rust?