Document "everything"
This is a good start but many things need to be documented better, but this will at least allow us to turn on #[deny(missing_docs)]
This commit is contained in:
@@ -82,6 +82,7 @@ fn string_or_bool<'de, D: Deserializer<'de>>(val: D) -> ::std::result::Result<bo
|
||||
})
|
||||
}
|
||||
|
||||
/// Data structure used for updating user credentials
|
||||
#[derive(Debug)]
|
||||
pub struct CredentialsBuilder<'a> {
|
||||
display_name: Option<&'a str>,
|
||||
@@ -91,6 +92,8 @@ pub struct CredentialsBuilder<'a> {
|
||||
}
|
||||
|
||||
impl<'a> CredentialsBuilder<'a> {
|
||||
/// Turns a `CredentialsForm` into a form suitable for PUTing to the
|
||||
/// endpoint
|
||||
pub fn into_form(self) -> Result<Form> {
|
||||
let mut form = Form::new();
|
||||
macro_rules! add_to_form {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/// Used for ser/de of list resources
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
pub struct List {
|
||||
id: String,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/// Represents a `mention` used in a status
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Mention {
|
||||
/// URL of user's profile (can be remote)
|
||||
|
||||
+15
-3
@@ -1,25 +1,37 @@
|
||||
/// Data structures for ser/de of account-related resources
|
||||
pub mod account;
|
||||
/// Data structures for ser/de of attachment-related resources
|
||||
pub mod attachment;
|
||||
/// Data structures for ser/de of card-related resources
|
||||
pub mod card;
|
||||
/// Data structures for ser/de of contetx-related resources
|
||||
pub mod context;
|
||||
/// Data structures for ser/de of instance-related resources
|
||||
pub mod instance;
|
||||
pub(crate) mod itemsiter;
|
||||
/// Data structures for ser/de of list-related resources
|
||||
pub mod list;
|
||||
/// Data structures for ser/de of mention-related resources
|
||||
pub mod mention;
|
||||
/// Data structures for ser/de of notification-related resources
|
||||
pub mod notification;
|
||||
/// Data structures for ser/de of relationship-related resources
|
||||
pub mod relationship;
|
||||
/// Data structures for ser/de of report-related resources
|
||||
pub mod report;
|
||||
/// Data structures for ser/de of search-related resources
|
||||
pub mod search_result;
|
||||
/// Data structures for ser/de of status-related resources
|
||||
pub mod status;
|
||||
|
||||
/// An empty JSON object.
|
||||
#[derive(Deserialize, Debug, Copy, Clone, PartialEq)]
|
||||
pub struct Empty {}
|
||||
|
||||
/// The purpose of this module is to alleviate imports of many common
|
||||
/// structs by adding a glob import to the top of mastodon heavy
|
||||
/// modules:
|
||||
pub mod prelude {
|
||||
//! The purpose of this module is to alleviate imports of many common
|
||||
//! structs by adding a glob import to the top of mastodon heavy
|
||||
//! modules:
|
||||
pub use super::{
|
||||
account::{Account, CredentialsBuilder, Source},
|
||||
attachment::{Attachment, MediaType},
|
||||
|
||||
Reference in New Issue
Block a user