Trait 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 CreateGroup<'_>

Source§

impl Endpoint for DeleteGroup

Source§

impl Endpoint for GetGroup

Source§

impl Endpoint for ListGroups

Source§

impl Endpoint for RemoveUserFromGroup

Source§

impl Endpoint for UpdateGroup<'_>

Source§

impl Endpoint for CreateIssueCategory<'_>

Source§

impl Endpoint for DeleteIssueCategory

Source§

impl Endpoint for GetIssueCategory

Source§

impl Endpoint for ListIssueCategories<'_>

Source§

impl Endpoint for UpdateIssueCategory<'_>

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 CreateIssue<'_>

Source§

impl Endpoint for DeleteIssue

Source§

impl Endpoint for GetIssue

Source§

impl Endpoint for ListIssues

Source§

impl Endpoint for RemoveWatcher

Source§

impl Endpoint for UpdateIssue<'_>

Source§

impl Endpoint for GetMyAccount

Source§

impl Endpoint for ListNews

Source§

impl Endpoint for ListProjectNews<'_>

Source§

impl Endpoint for CreateProjectMembership<'_>

Source§

impl Endpoint for DeleteProjectMembership

Source§

impl Endpoint for GetProjectMembership

Source§

impl Endpoint for ListProjectMemberships<'_>

Source§

impl Endpoint for UpdateProjectMembership

Source§

impl Endpoint for ArchiveProject<'_>

Source§

impl Endpoint for CreateProject<'_>

Source§

impl Endpoint for DeleteProject<'_>

Source§

impl Endpoint for GetProject<'_>

Source§

impl Endpoint for ListProjects

Source§

impl Endpoint for UnarchiveProject<'_>

Source§

impl Endpoint for UpdateProject<'_>

Source§

impl Endpoint for ListQueries

Source§

impl Endpoint for GetRole

Source§

impl Endpoint for ListRoles

Source§

impl Endpoint for CreateTimeEntry<'_>

Source§

impl Endpoint for DeleteTimeEntry

Source§

impl Endpoint for GetTimeEntry

Source§

impl Endpoint for ListTimeEntries<'_>

Source§

impl Endpoint for UpdateTimeEntry<'_>

Source§

impl Endpoint for ListTrackers

Source§

impl Endpoint for UploadFile<'_>

Source§

impl Endpoint for CreateUser<'_>

Source§

impl Endpoint for DeleteUser

Source§

impl Endpoint for GetUser

Source§

impl Endpoint for ListUsers<'_>

Source§

impl Endpoint for UpdateUser<'_>

Source§

impl Endpoint for CreateVersion<'_>

Source§

impl Endpoint for DeleteVersion

Source§

impl Endpoint for GetVersion

Source§

impl Endpoint for ListVersions<'_>

Source§

impl Endpoint for UpdateVersion<'_>