pub enum RouteAction {
List,
Show,
Create,
Update,
Remove,
}Available on non-WebAssembly only.
Expand description
One of the routes rws gen route writes for a resource.
Variants§
List
GET /posts
Show
GET /posts/{id}
Create
POST /posts
Update
PUT /posts/{id}
Remove
DELETE /posts/{id}
Implementations§
Source§impl RouteAction
impl RouteAction
Sourcepub const ALL: [RouteAction; 5]
pub const ALL: [RouteAction; 5]
Every action, in the order the routes are written.
Sourcepub fn parse(text: &str) -> Option<RouteAction>
pub fn parse(text: &str) -> Option<RouteAction>
list, show, create, update, remove (also delete).
Sourcepub fn parse_list(text: &str) -> Result<Vec<RouteAction>, GenError>
pub fn parse_list(text: &str) -> Result<Vec<RouteAction>, GenError>
list,show → the actions in Self::ALL order, once each.
Trait Implementations§
Source§impl Clone for RouteAction
impl Clone for RouteAction
impl Copy for RouteAction
Source§impl Debug for RouteAction
impl Debug for RouteAction
impl Eq for RouteAction
Source§impl PartialEq for RouteAction
impl PartialEq for RouteAction
impl StructuralPartialEq for RouteAction
Auto Trait Implementations§
impl Freeze for RouteAction
impl RefUnwindSafe for RouteAction
impl Send for RouteAction
impl Sync for RouteAction
impl Unpin for RouteAction
impl UnsafeUnpin for RouteAction
impl UnwindSafe for RouteAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more