[][src]Struct matchmaker::Category

pub struct Category {
    pub name: String,
    pub max_placements: usize,
}

Holds a category

Fields

name: String

Name of the category (must be unique)

max_placements: usize

Maximum number of students that can be placed in category this category

Implementations

impl Category[src]

pub fn new(name: &str, max_placements: usize) -> Self[src]

Return a new Category

Arguments

  • name - Name of the category (must be unique)
  • max_placements - Maximum number of students that can be placed in category this category

Example

use matchmaker::Category;

// Category cooking with capacity of 10 placements
let cooking = Category::new("Cooking", 10);

// Category reading with capacity of 5 placements
let reading = Category::new("Reading", 5);

Trait Implementations

impl Clone for Category[src]

impl Debug for Category[src]

impl<'de> Deserialize<'de> for Category[src]

impl Eq for Category[src]

impl Hash for Category[src]

impl PartialEq<Category> for Category[src]

impl Serialize for Category[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,