Trait redmine_api::api::Endpoint

source ·
pub trait Endpoint {
    // Required methods
    fn method(&self) -> Method;
    fn endpoint(&self) -> Cow<'static, str>;

    // Provided methods
    fn parameters(&self) -> QueryParams<'_> { ... }
    fn body(&self) -> Result<Option<(&'static str, Vec<u8>)>, Error> { ... }
}
Expand description

A trait for providing the necessary information for a single REST API endpoint.

Required Methods§

source

fn method(&self) -> Method

The HTTP method to use for the endpoint.

source

fn endpoint(&self) -> Cow<'static, str>

The path to the endpoint.

Provided Methods§

source

fn parameters(&self) -> QueryParams<'_>

Query parameters for the endpoint.

source

fn body(&self) -> Result<Option<(&'static str, Vec<u8>)>, Error>

The body for the endpoint.

Returns the Content-Encoding header for the data as well as the data itself.

§Errors

The default implementation will never return an error

Implementors§

source§

impl Endpoint for DeleteAttachment

source§

impl Endpoint for GetAttachment

source§

impl Endpoint for ListCustomFields

source§

impl Endpoint for ListDocumentCategories

source§

impl Endpoint for ListIssuePriorities

source§

impl Endpoint for ListTimeEntryActivities

source§

impl Endpoint for AddUserToGroup

source§

impl Endpoint for DeleteGroup

source§

impl Endpoint for GetGroup

source§

impl Endpoint for ListGroups

source§

impl Endpoint for RemoveUserFromGroup

source§

impl Endpoint for DeleteIssueCategory

source§

impl Endpoint for GetIssueCategory

source§

impl Endpoint for CreateIssueRelation

source§

impl Endpoint for DeleteIssueRelation

source§

impl Endpoint for GetIssueRelation

source§

impl Endpoint for ListIssueRelations

source§

impl Endpoint for ListIssueStatuses

source§

impl Endpoint for AddWatcher

source§

impl Endpoint for DeleteIssue

source§

impl Endpoint for GetIssue

source§

impl Endpoint for ListIssues

source§

impl Endpoint for RemoveWatcher

source§

impl Endpoint for GetMyAccount

source§

impl Endpoint for ListNews

source§

impl Endpoint for DeleteProjectMembership

source§

impl Endpoint for GetProjectMembership

source§

impl Endpoint for UpdateProjectMembership

source§

impl Endpoint for ListProjects

source§

impl Endpoint for ListQueries

source§

impl Endpoint for GetRole

source§

impl Endpoint for ListRoles

source§

impl Endpoint for DeleteTimeEntry

source§

impl Endpoint for GetTimeEntry

source§

impl Endpoint for ListTrackers

source§

impl Endpoint for DeleteUser

source§

impl Endpoint for GetUser

source§

impl Endpoint for DeleteVersion

source§

impl Endpoint for GetVersion

source§

impl<'a> Endpoint for CreateGroup<'a>

source§

impl<'a> Endpoint for UpdateGroup<'a>

source§

impl<'a> Endpoint for CreateIssueCategory<'a>

source§

impl<'a> Endpoint for ListIssueCategories<'a>

source§

impl<'a> Endpoint for UpdateIssueCategory<'a>

source§

impl<'a> Endpoint for CreateIssue<'a>

source§

impl<'a> Endpoint for UpdateIssue<'a>

source§

impl<'a> Endpoint for ListProjectNews<'a>

source§

impl<'a> Endpoint for CreateProjectMembership<'a>

source§

impl<'a> Endpoint for ListProjectMemberships<'a>

source§

impl<'a> Endpoint for ArchiveProject<'a>

source§

impl<'a> Endpoint for CreateProject<'a>

source§

impl<'a> Endpoint for DeleteProject<'a>

source§

impl<'a> Endpoint for GetProject<'a>

source§

impl<'a> Endpoint for UnarchiveProject<'a>

source§

impl<'a> Endpoint for UpdateProject<'a>

source§

impl<'a> Endpoint for CreateTimeEntry<'a>

source§

impl<'a> Endpoint for ListTimeEntries<'a>

source§

impl<'a> Endpoint for UpdateTimeEntry<'a>

source§

impl<'a> Endpoint for UploadFile<'a>

source§

impl<'a> Endpoint for CreateUser<'a>

source§

impl<'a> Endpoint for ListUsers<'a>

source§

impl<'a> Endpoint for UpdateUser<'a>

source§

impl<'a> Endpoint for CreateVersion<'a>

source§

impl<'a> Endpoint for ListVersions<'a>

source§

impl<'a> Endpoint for UpdateVersion<'a>