Skip to main content

Endpoint

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Endpoint for AddUserToGroup

Source§

impl Endpoint for AddWatcher

Source§

impl Endpoint for ArchiveProject<'_>

Source§

impl Endpoint for CloseCompletedVersion

Source§

impl Endpoint for CreateFile<'_>

Source§

impl Endpoint for CreateGroup<'_>

Source§

impl Endpoint for CreateIssue<'_>

Source§

impl Endpoint for CreateIssueCategory<'_>

Source§

impl Endpoint for CreateIssueRelation

Source§

impl Endpoint for CreateNews<'_>

Source§

impl Endpoint for CreateOrUpdateProjectWikiPage<'_>

Source§

impl Endpoint for CreateProject<'_>

Source§

impl Endpoint for CreateProjectMembership<'_>

Source§

impl Endpoint for CreateTimeEntry<'_>

Source§

impl Endpoint for CreateUser<'_>

Source§

impl Endpoint for CreateVersion<'_>

Source§

impl Endpoint for DeleteAttachment

Source§

impl Endpoint for DeleteGroup

Source§

impl Endpoint for DeleteIssue

Source§

impl Endpoint for DeleteIssueCategory

Source§

impl Endpoint for DeleteIssueRelation

Source§

impl Endpoint for DeleteNews

Source§

impl Endpoint for DeleteProject<'_>

Source§

impl Endpoint for DeleteProjectMembership

Source§

impl Endpoint for DeleteProjectWikiPage<'_>

Source§

impl Endpoint for DeleteProjectWikiPageVersion<'_>

Source§

impl Endpoint for DeleteTimeEntry

Source§

impl Endpoint for DeleteUser

Source§

impl Endpoint for DeleteVersion

Source§

impl Endpoint for ExportProjectWikiPage<'_>

Source§

impl Endpoint for GetAttachment

Source§

impl Endpoint for GetGroup

Source§

impl Endpoint for GetIssue

Source§

impl Endpoint for GetIssueCategory

Source§

impl Endpoint for GetIssueRelation

Source§

impl Endpoint for GetMyAccount

Source§

impl Endpoint for GetNews

Source§

impl Endpoint for GetProject<'_>

Source§

impl Endpoint for GetProjectMembership

Source§

impl Endpoint for GetProjectWikiPage<'_>

Source§

impl Endpoint for GetProjectWikiPageAnnotate<'_>

Source§

impl Endpoint for GetProjectWikiPageVersion<'_>

Source§

impl Endpoint for GetRole

Source§

impl Endpoint for GetTimeEntry

Source§

impl Endpoint for GetUser

Source§

impl Endpoint for GetVersion

Source§

impl Endpoint for ListCustomFields

Source§

impl Endpoint for ListDocumentCategories

Source§

impl Endpoint for ListGroups

Source§

impl Endpoint for ListIssueCategories<'_>

Source§

impl Endpoint for ListIssuePriorities

Source§

impl Endpoint for ListIssueRelations

Source§

impl Endpoint for ListIssueStatuses

Source§

impl Endpoint for ListIssues

Source§

impl Endpoint for ListNews

Source§

impl Endpoint for ListProjectFiles<'_>

Source§

impl Endpoint for ListProjectMemberships<'_>

Source§

impl Endpoint for ListProjectNews<'_>

Source§

impl Endpoint for ListProjectWikiPages<'_>

Source§

impl Endpoint for ListProjects

Source§

impl Endpoint for ListQueries

Source§

impl Endpoint for ListRoles

Source§

impl Endpoint for ListTimeEntries<'_>

Source§

impl Endpoint for ListTimeEntryActivities

Source§

impl Endpoint for ListTrackers

Source§

impl Endpoint for ListUsers<'_>

Source§

impl Endpoint for ListVersions<'_>

Source§

impl Endpoint for RemoveUserFromGroup

Source§

impl Endpoint for RemoveWatcher

Source§

impl Endpoint for UnarchiveProject<'_>

Source§

impl Endpoint for UpdateAttachment

Source§

impl Endpoint for UpdateGroup<'_>

Source§

impl Endpoint for UpdateIssue<'_>

Source§

impl Endpoint for UpdateIssueCategory<'_>

Source§

impl Endpoint for UpdateMyAccount<'_>

Source§

impl Endpoint for UpdateNews<'_>

Source§

impl Endpoint for UpdateProject<'_>

Source§

impl Endpoint for UpdateProjectMembership

Source§

impl Endpoint for UpdateTimeEntry<'_>

Source§

impl Endpoint for UpdateUser<'_>

Source§

impl Endpoint for UpdateVersion<'_>

Source§

impl Endpoint for UploadFile<'_>