pub struct Success<T>(_);
Expand description

This can be returned from a resource when there is no cause of an error. For example:

#[derive(Deserialize, Serialize)]
struct MyResponse {
	message: String
}

#[rest_read_all(MyResource)]
fn read_all(_state: &mut State) -> Success<MyResponse> {
	let res = MyResponse { message: "I'm always happy".to_string() };
	res.into()
}

Trait Implementations

Performs the conversion.

Turn this into a response that can be returned to the browser. This api will likely change in the future. Read more

Return a list of supported mime types.

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

Performs the conversion.

Returns the argument unchanged.

Calls U::from(self).

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

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.