pub trait AddPrefix {
    // Required method
    fn prefix(&mut self, prefix_conf: &PrefixConfiguration);

    // Provided methods
    fn add_prefix(&mut self, prefix: &str) { ... }
    fn add_prefix_with_sep(&mut self, prefix: &str, sep: &str) { ... }
}
Expand description

Trait for object that can be prefixed

Required Methods§

source

fn prefix(&mut self, prefix_conf: &PrefixConfiguration)

Add the prefix to all elements of the object that needs to be prefixed. PrefixConfiguration contains all the needed metadata to create the complete prefix.

Provided Methods§

source

fn add_prefix(&mut self, prefix: &str)

👎Deprecated since 0.24.0: please use AddPrefix::prefix() instead

Add the prefix to all elements of the object that needs to be prefixed.

source

fn add_prefix_with_sep(&mut self, prefix: &str, sep: &str)

👎Deprecated since 0.24.0: please use AddPrefix::prefix() instead

Add the prefix to all elements of the object that needs to be prefixed. A separator will be placed between the prefix and the identifier.

Implementations on Foreign Types§

source§

impl<T> AddPrefix for CollectionWithId<T>where T: Id<T> + AddPrefix,

source§

fn prefix(&mut self, prefix_conf: &PrefixConfiguration)

source§

impl<T> AddPrefix for Collection<T>where T: AddPrefix,

source§

fn prefix(&mut self, prefix_conf: &PrefixConfiguration)

Implementors§