pub struct Keywords {
pub keywords: Vec<&'static str>,
}Fields§
§keywords: Vec<&'static str>Implementations§
Source§impl Keywords
impl Keywords
Sourcepub fn new(keywords: Vec<&'static str>) -> Self
pub fn new(keywords: Vec<&'static str>) -> Self
Create a new set of keywords.
Keywords vector is limited to a maximum of 5 keyword.
Returns a Keywords instance.
§Example
use rtrend::Keywords;
let keywords = Keywords::new(vec!["Unicorn","Labradoodle","Pikachu"]);§Panics
A vector of length greater than 5 will panic.
ⓘ
let seven_dwarf = vec!["Bashful","Doc", "Dopey","Grumpy","Happy", "Sleepy", "Sneezy"];
let keywords = Keywords::new(seven_dwarf);A vector without keywords will also panic.
ⓘ
let keywords = Keywords::new(vec![]);Examples found in repository?
More examples
Additional examples can be found in:
Trait Implementations§
Source§impl Ord for Keywords
impl Ord for Keywords
Source§impl PartialOrd for Keywords
impl PartialOrd for Keywords
impl Eq for Keywords
impl StructuralPartialEq for Keywords
Auto Trait Implementations§
impl Freeze for Keywords
impl RefUnwindSafe for Keywords
impl Send for Keywords
impl Sync for Keywords
impl Unpin for Keywords
impl UnwindSafe for Keywords
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.