pub struct Checklist {
pub tasks: Vec<ChecklistTask>,
pub title: String,
pub others_can_add_tasks: Option<bool>,
pub others_can_mark_tasks_as_done: Option<bool>,
pub title_entities: Option<TextEntities>,
}Expand description
Describes a checklist.
Fields§
§tasks: Vec<ChecklistTask>List of tasks in the checklist.
title: StringTitle of the checklist.
others_can_add_tasks: Option<bool>Whether users other than the creator of the list can add tasks to the list.
others_can_mark_tasks_as_done: Option<bool>Whether users other than the creator of the list can mark tasks as done or not done.
title_entities: Option<TextEntities>Special entities that appear in the checklist title.
Implementations§
Source§impl Checklist
impl Checklist
Sourcepub fn new<A, B>(tasks: A, title: B) -> Self
pub fn new<A, B>(tasks: A, title: B) -> Self
Creates a new Checklist.
§Arguments
tasks- List of tasks in the checklist.title- Title of the checklist.
Sourcepub fn with_others_can_add_tasks(self, value: bool) -> Self
pub fn with_others_can_add_tasks(self, value: bool) -> Self
Sets a new value for the others_can_add_tasks flag.
§Arguments
value- Whether users other than the creator of the list can add tasks to the list.
Sourcepub fn with_others_can_mark_tasks_as_done(self, value: bool) -> Self
pub fn with_others_can_mark_tasks_as_done(self, value: bool) -> Self
Sets a new value for the others_can_mark_tasks_as_done flag.
§Arguments
value- Whether users other than the creator of the list can mark tasks as done or not done.
Sourcepub fn with_title_entities<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = TextEntity>,
pub fn with_title_entities<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = TextEntity>,
Sets a new list of title entities.
§Arguments
value- Special entities that appear in the checklist title
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Checklist
impl<'de> Deserialize<'de> for Checklist
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Checklist> for ExternalReplyData
impl From<Checklist> for ExternalReplyData
Source§impl From<Checklist> for MessageData
impl From<Checklist> for MessageData
impl StructuralPartialEq for Checklist
Auto Trait Implementations§
impl Freeze for Checklist
impl RefUnwindSafe for Checklist
impl Send for Checklist
impl Sync for Checklist
impl Unpin for Checklist
impl UnsafeUnpin for Checklist
impl UnwindSafe for Checklist
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