Struct actix_web::dev::ResourceInfo

source ·
pub struct ResourceInfo { /* private fields */ }
Expand description

Information about current resource

Implementations

Name os the resource

This method returns reference to matched ResourceDef object.

Get a reference to the Params object.

Params is a container for url parameters. A variable segment is specified in the form {identifier}, where the identifier can be used later in a request handler to access the matched value for that segment.

Generate url for named resource

Check HttpRequest::url_for()(../struct.HttpRequest.html#method. url_for) for detailed information.

Check if application contains matching resource.

This method does not take prefix into account. For example if prefix is /test and router contains route /name, following path would be recognizable /test/name but has_resource() call would return false.

Check if application contains matching resource.

This method does take prefix into account but behaves like has_route in case prefix is not set in the router.

For example if prefix is /test and router contains route /name, the following path would be recognizable /test/name and has_prefixed_route() call would return true. It will not match against prefix in case it’s not given. For example for /name with a /test prefix would return false

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.