[][src]Struct trello::List

pub struct List {
    pub id: String,
    pub name: String,
    pub closed: bool,
    pub cards: Option<Vec<Card>>,
}

Fields

id: Stringname: Stringclosed: boolcards: Option<Vec<Card>>

Methods

impl List[src]

pub fn new(id: &str, name: &str, cards: Option<Vec<Card>>) -> List[src]

pub fn filter(&self, label_filter: &str) -> List[src]

Filters cards that match the given label_filter (As a regular expression). Returns a copy of the original List, with the correct filtering applied.

use trello::{Card, Label, List};

let list = List::new(
    "123",
    "TODO",
    Some(vec![
        Card::new("1", "Orange", "", Some(vec![Label::new("", "fruit", "")]), ""),
        Card::new("2", "Green", "", None, ""),
    ])
);

assert_eq!(
    list.filter("idontexist"),
    List::new(
        "123",
        "TODO",
        Some(vec![]),
    )
);

assert_eq!(
    list.filter("fruit"),
    List::new(
        "123",
        "TODO",
        Some(vec![
            Card::new("1", "Orange", "", Some(vec![Label::new("", "fruit", "")]), "")
        ])
    )
);

pub fn create(
    client: &Client,
    board_id: &str,
    name: &str
) -> Result<List, TrelloError>
[src]

pub fn open(client: &Client, list_id: &str) -> Result<List, TrelloError>[src]

pub fn update(client: &Client, list: &List) -> Result<List, TrelloError>[src]

pub fn get_all(
    client: &Client,
    board_id: &str,
    cards: bool
) -> Result<Vec<List>, TrelloError>
[src]

Trait Implementations

impl Clone for List[src]

impl Debug for List[src]

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

impl Eq for List[src]

impl PartialEq<List> for List[src]

impl Renderable for List[src]

impl StructuralEq for List[src]

impl StructuralPartialEq for List[src]

impl TrelloObject for List[src]

Auto Trait Implementations

impl RefUnwindSafe for List

impl Send for List

impl Sync for List

impl Unpin for List

impl UnwindSafe for List

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[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<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

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