Struct jokeapi_rs::Joke [−][src]
pub struct Joke { pub url: String, pub joke: String, pub joke_type: String, pub categories: String, pub blacklist_flags: String, pub safe: String, // some fields omitted }
Expand description
Main joke struct
Fields
url: String
joke: String
joke_type: String
categories: String
blacklist_flags: String
safe: String
Implementations
impl Joke
[src]
impl Joke
[src]pub fn of_type(&mut self, joke_type: &str) -> &mut Self
[src]
pub fn of_type(&mut self, joke_type: &str) -> &mut Self
[src]Specify the type of the joke (single or twopart). If not specified joke could be of any type.
pub fn categories(&mut self, categories: Vec<String>) -> &mut Self
[src]
pub fn categories(&mut self, categories: Vec<String>) -> &mut Self
[src]Specify certain categories the joke should fit in. Available categories:
- Programming
- Misc
- Dar
- Pun
- Spooky
- Christmas
Auto Trait Implementations
impl !RefUnwindSafe for Joke
impl Send for Joke
impl Sync for Joke
impl Unpin for Joke
impl !UnwindSafe for Joke
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]