Enum trillium_client::Method

source ·
#[non_exhaustive]
pub enum Method {
Show 40 variants Acl, BaselineControl, Bind, Checkin, Checkout, Connect, Copy, Delete, Get, Head, Label, Link, Lock, Merge, MkActivity, MkCalendar, MkCol, MkRedirectRef, MkWorkspace, Move, Options, OrderPatch, Patch, Post, Pri, PropFind, PropPatch, Put, Query, Rebind, Report, Search, Trace, Unbind, Uncheckout, Unlink, Unlock, Update, UpdateRedirectRef, VersionControl,
}
Expand description

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Acl

The ACL method modifies the access control list (which can be read via the DAV:acl property) of a resource.

See RFC3744, Section 8.1.

§

BaselineControl

A collection can be placed under baseline control with a BASELINE-CONTROL request.

See RFC3253, Section 12.6.

§

Bind

The BIND method modifies the collection identified by the Request- URI, by adding a new binding from the segment specified in the BIND body to the resource identified in the BIND body.

See RFC5842, Section 4.

§

Checkin

A CHECKIN request can be applied to a checked-out version-controlled resource to produce a new version whose content and dead properties are copied from the checked-out resource.

See RFC3253, Section 4.4 and RFC3253, Section 9.4.

§

Checkout

A CHECKOUT request can be applied to a checked-in version-controlled resource to allow modifications to the content and dead properties of that version-controlled resource.

See RFC3253, Section 4.3 and RFC3253, Section 8.8.

§

Connect

The CONNECT method requests that the recipient establish a tunnel to the destination origin server identified by the request-target and, if successful, thereafter restrict its behavior to blind forwarding of packets, in both directions, until the tunnel is closed.

See RFC7231, Section 4.3.6.

§

Copy

The COPY method creates a duplicate of the source resource identified by the Request-URI, in the destination resource identified by the URI in the Destination header.

See RFC4918, Section 9.8.

§

Delete

The DELETE method requests that the origin server remove the association between the target resource and its current functionality.

See RFC7231, Section 4.3.5.

§

Get

The GET method requests transfer of a current selected representation for the target resource.

See RFC7231, Section 4.3.1.

§

Head

The HEAD method is identical to GET except that the server MUST NOT send a message body in the response.

See RFC7231, Section 4.3.2.

§

Label

A LABEL request can be applied to a version to modify the labels that select that version.

See RFC3253, Section 8.2.

The LINK method establishes one or more Link relationships between the existing resource identified by the Request-URI and other existing resources.

See RFC2068, Section 19.6.1.2.

§

Lock

The LOCK method is used to take out a lock of any access type and to refresh an existing lock.

See RFC4918, Section 9.10.

§

Merge

The MERGE method performs the logical merge of a specified version (the “merge source”) into a specified version-controlled resource (the “merge target”).

See RFC3253, Section 11.2.

§

MkActivity

A MKACTIVITY request creates a new activity resource.

See RFC3253, Section 13.5.

§

MkCalendar

An HTTP request using the MKCALENDAR method creates a new calendar collection resource.

See RFC4791, Section 5.3.1 and RFC8144, Section 2.3.

§

MkCol

MKCOL creates a new collection resource at the location specified by the Request-URI.

See RFC4918, Section 9.3, RFC5689, Section 3 and RFC8144, Section 2.3.

§

MkRedirectRef

The MKREDIRECTREF method requests the creation of a redirect reference resource.

See RFC4437, Section 6.

§

MkWorkspace

A MKWORKSPACE request creates a new workspace resource.

See RFC3253, Section 6.3.

§

Move

The MOVE operation on a non-collection resource is the logical equivalent of a copy (COPY), followed by consistency maintenance processing, followed by a delete of the source, where all three actions are performed in a single operation.

See RFC4918, Section 9.9.

§

Options

The OPTIONS method requests information about the communication options available for the target resource, at either the origin server or an intervening intermediary.

See RFC7231, Section 4.3.7.

§

OrderPatch

The ORDERPATCH method is used to change the ordering semantics of a collection, to change the order of the collection’s members in the ordering, or both.

See RFC3648, Section 7.

§

Patch

The PATCH method requests that a set of changes described in the request entity be applied to the resource identified by the Request- URI.

See RFC5789, Section 2.

§

Post

The POST method requests that the target resource process the representation enclosed in the request according to the resource’s own specific semantics.

For example, POST is used for the following functions (among others):

  • Providing a block of data, such as the fields entered into an HTML form, to a data-handling process;
  • Posting a message to a bulletin board, newsgroup, mailing list, blog, or similar group of articles;
  • Creating a new resource that has yet to be identified by the origin server; and
  • Appending data to a resource’s existing representation(s).

See RFC7231, Section 4.3.3.

§

Pri

This method is never used by an actual client. This method will appear to be used when an HTTP/1.1 server or intermediary attempts to parse an HTTP/2 connection preface.

See RFC7540, Section 3.5 and RFC7540, Section 11.6

§

PropFind

The PROPFIND method retrieves properties defined on the resource identified by the Request-URI.

See RFC4918, Section 9.1 and RFC8144, Section 2.1.

§

PropPatch

The PROPPATCH method processes instructions specified in the request body to set and/or remove properties defined on the resource identified by the Request-URI.

See RFC4918, Section 9.2 and RFC8144, Section 2.2.

§

Put

The PUT method requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

See RFC7231, Section 4.3.4.

§

Query

The QUERY method is used to initiate a server-side query. Unlike the HTTP GET method, which requests that a server return a representation of the resource identified by the target URI, the QUERY method is used to ask the server to perform a query operation (described by the request payload) over some set of data scoped to the effective request URI. See draft-ietf-httpbis-safe-method-w-body-03

NOTE: As of January 2023, this draft has expired.

§

Rebind

The REBIND method removes a binding to a resource from a collection, and adds a binding to that resource into the collection identified by the Request-URI.

See RFC5842, Section 6.

§

Report

A REPORT request is an extensible mechanism for obtaining information about a resource.

See RFC3253, Section 3.6 and RFC8144, Section 2.1.

§

Search

The client invokes the SEARCH method to initiate a server-side search. The body of the request defines the query.

See RFC5323, Section 2.

§

Trace

The TRACE method requests a remote, application-level loop-back of the request message.

See RFC7231, Section 4.3.8.

§

Unbind

The UNBIND method modifies the collection identified by the Request- URI by removing the binding identified by the segment specified in the UNBIND body.

See RFC5842, Section 5.

§

Uncheckout

An UNCHECKOUT request can be applied to a checked-out version-controlled resource to cancel the CHECKOUT and restore the pre-CHECKOUT state of the version-controlled resource.

See RFC3253, Section 4.5.

The UNLINK method removes one or more Link relationships from the existing resource identified by the Request-URI.

See RFC2068, Section 19.6.1.3.

§

Unlock

The UNLOCK method removes the lock identified by the lock token in the Lock-Token request header.

See RFC4918, Section 9.11.

§

Update

The UPDATE method modifies the content and dead properties of a checked-in version-controlled resource (the “update target”) to be those of a specified version (the “update source”) from the version history of that version-controlled resource.

See RFC3253, Section 7.1.

§

UpdateRedirectRef

The UPDATEREDIRECTREF method requests the update of a redirect reference resource.

See RFC4437, Section 7.

§

VersionControl

A VERSION-CONTROL request can be used to create a version-controlled resource at the request-URL.

See RFC3253, Section 3.5.

Implementations§

source§

impl Method

source

pub const fn is_safe(&self) -> bool

Predicate that returns whether the method is “safe.”

Request methods are considered “safe” if their defined semantics are essentially read-only; i.e., the client does not request, and does not expect, any state change on the origin server as a result of applying a safe method to a target resource.

rfc7231§4.2.1

source

pub const fn is_idempotent(&self) -> bool

predicate that returns whether this method is considered “idempotent”.

A request method is considered “idempotent” if the intended effect on the server of multiple identical requests with that method is the same as the effect for a single such request.

rfc7231§4.2.2

source

pub const fn as_str(&self) -> &'static str

returns the static str representation of this method

Trait Implementations§

source§

impl AsRef<str> for Method

source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for Method

source§

fn clone(&self) -> Method

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Method

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Display for Method

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl FromStr for Method

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Method, <Method as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for Method

source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Method

source§

fn cmp(&self, other: &Method) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Method

source§

fn eq(&self, other: &Method) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Method

source§

fn partial_cmp(&self, other: &Method) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a> TryFrom<&'a str> for Method

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from( value: &'a str, ) -> Result<Method, <Method as TryFrom<&'a str>>::Error>

Performs the conversion.
source§

impl Copy for Method

source§

impl Eq for Method

source§

impl StructuralPartialEq for Method

Auto Trait Implementations§

§

impl Freeze for Method

§

impl RefUnwindSafe for Method

§

impl Send for Method

§

impl Sync for Method

§

impl Unpin for Method

§

impl UnwindSafe for Method

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.