Struct htrpc::types::EntryPoint
source · pub struct EntryPoint { /* private fields */ }
Expand description
The entry point definition of a procedure.
Implementations§
source§impl EntryPoint
impl EntryPoint
sourcepub fn new(segments: &'static [PathSegment]) -> Self
pub fn new(segments: &'static [PathSegment]) -> Self
Makes a new EntryPoint
instance.
Usually it is convenient to use htrpc_entry_point!
macro to construct this.
Examples
use htrpc::types::{EntryPoint, PathSegment};
static SEGMENTS: &[PathSegment] =
&[PathSegment::Val("foo"), PathSegment::Var, PathSegment::Val("baz")];
let p0 = EntryPoint::new(SEGMENTS);
let p1 = htrpc_entry_point!["foo", _, "baz"];
assert_eq!(p0, p1);
sourcepub fn segments(&self) -> &'static [PathSegment]
pub fn segments(&self) -> &'static [PathSegment]
Returns the segments in this entry point.
Trait Implementations§
source§impl Clone for EntryPoint
impl Clone for EntryPoint
source§fn clone(&self) -> EntryPoint
fn clone(&self) -> EntryPoint
Returns a copy 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 moresource§impl Debug for EntryPoint
impl Debug for EntryPoint
source§impl PartialEq<EntryPoint> for EntryPoint
impl PartialEq<EntryPoint> for EntryPoint
source§fn eq(&self, other: &EntryPoint) -> bool
fn eq(&self, other: &EntryPoint) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for EntryPoint
impl Eq for EntryPoint
impl StructuralEq for EntryPoint
impl StructuralPartialEq for EntryPoint
Auto Trait Implementations§
impl RefUnwindSafe for EntryPoint
impl Send for EntryPoint
impl Sync for EntryPoint
impl Unpin for EntryPoint
impl UnwindSafe for EntryPoint
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.