Struct NextJsRouteSegment
pub struct NextJsRouteSegment(/* private fields */);Expand description
Validated Next.js route segment metadata.
Implementations§
§impl NextJsRouteSegment
impl NextJsRouteSegment
pub fn new(input: &str) -> Result<NextJsRouteSegment, NextJsRouteError>
pub fn new(input: &str) -> Result<NextJsRouteSegment, NextJsRouteError>
Creates Next.js route segment metadata.
§Errors
Returns NextJsRouteError when input is empty or contains a path separator or control character.
Trait Implementations§
§impl Clone for NextJsRouteSegment
impl Clone for NextJsRouteSegment
§fn clone(&self) -> NextJsRouteSegment
fn clone(&self) -> NextJsRouteSegment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for NextJsRouteSegment
impl Debug for NextJsRouteSegment
§impl Display for NextJsRouteSegment
impl Display for NextJsRouteSegment
§impl FromStr for NextJsRouteSegment
impl FromStr for NextJsRouteSegment
§type Err = NextJsRouteError
type Err = NextJsRouteError
The associated error which can be returned from parsing.
§fn from_str(
input: &str,
) -> Result<NextJsRouteSegment, <NextJsRouteSegment as FromStr>::Err>
fn from_str( input: &str, ) -> Result<NextJsRouteSegment, <NextJsRouteSegment as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for NextJsRouteSegment
impl Hash for NextJsRouteSegment
§impl Ord for NextJsRouteSegment
impl Ord for NextJsRouteSegment
§fn cmp(&self, other: &NextJsRouteSegment) -> Ordering
fn cmp(&self, other: &NextJsRouteSegment) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl PartialEq for NextJsRouteSegment
impl PartialEq for NextJsRouteSegment
§impl PartialOrd for NextJsRouteSegment
impl PartialOrd for NextJsRouteSegment
§impl TryFrom<&str> for NextJsRouteSegment
impl TryFrom<&str> for NextJsRouteSegment
§type Error = NextJsRouteError
type Error = NextJsRouteError
The type returned in the event of a conversion error.
§fn try_from(
value: &str,
) -> Result<NextJsRouteSegment, <NextJsRouteSegment as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<NextJsRouteSegment, <NextJsRouteSegment as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for NextJsRouteSegment
impl StructuralPartialEq for NextJsRouteSegment
Auto Trait Implementations§
impl Freeze for NextJsRouteSegment
impl RefUnwindSafe for NextJsRouteSegment
impl Send for NextJsRouteSegment
impl Sync for NextJsRouteSegment
impl Unpin for NextJsRouteSegment
impl UnsafeUnpin for NextJsRouteSegment
impl UnwindSafe for NextJsRouteSegment
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