[−][src]Struct trello::Card
Fields
id: String
name: String
desc: String
closed: bool
url: String
labels: Option<Vec<Label>>
Methods
impl Card
[src]
pub fn new(
id: &str,
name: &str,
desc: &str,
labels: Option<Vec<Label>>,
url: &str
) -> Card
[src]
id: &str,
name: &str,
desc: &str,
labels: Option<Vec<Label>>,
url: &str
) -> Card
pub fn parse(buffer: &str) -> Result<CardContents, SimpleError>
[src]
Takes a buffer of contents that represent a Card render and parses it into a CardContents structure. This is similar to a deserialization process except this is quite unstructured and is not very strict in order to allow the user to more easily edit card contents.
let buffer = "Hello World\n===\nThis is my card"; let card_contents = trello::Card::parse(buffer)?; assert_eq!( card_contents, trello::CardContents { name: String::from("Hello World"), desc: String::from("This is my card"), }, );
Invalid data will result in an appropriate error being returned.
use simple_error::SimpleError; let buffer = ""; let result = trello::Card::parse(buffer); assert_eq!( result, Err(SimpleError::new("Unable to parse - Unable to find name delimiter '===='")) );
pub fn create(
client: &Client,
list_id: &str,
card: &Card
) -> Result<Card, Box<dyn Error>>
[src]
client: &Client,
list_id: &str,
card: &Card
) -> Result<Card, Box<dyn Error>>
pub fn update(client: &Client, card: &Card) -> Result<Card, Box<dyn Error>>
[src]
Trait Implementations
impl Clone for Card
[src]
impl Debug for Card
[src]
impl<'de> Deserialize<'de> for Card
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Card
[src]
impl PartialEq<Card> for Card
[src]
impl StructuralEq for Card
[src]
impl StructuralPartialEq for Card
[src]
impl TrelloObject for Card
[src]
Auto Trait Implementations
impl RefUnwindSafe for Card
impl Send for Card
impl Sync for Card
impl Unpin for Card
impl UnwindSafe for Card
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,