pub struct EndpointConfig { /* private fields */ }Expand description
A validated set of per-family base URLs.
Each field is a parsed Url; the field is private and only reachable via
EndpointConfig::resolve, which percent-encodes dynamic segments. There is
no string-fallback path.
Implementations§
Source§impl EndpointConfig
impl EndpointConfig
Sourcepub fn builder() -> EndpointConfigBuilder
pub fn builder() -> EndpointConfigBuilder
Start a builder.
Sourcepub fn resolve(&self, family: ApiFamily, segments: &[&str]) -> ZaiResult<String>
pub fn resolve(&self, family: ApiFamily, segments: &[&str]) -> ZaiResult<String>
Resolve path_segments (applied in order) against the family base,
returning a fully-formed URL string. Each segment is percent-encoded;
empty, . and .. segments are rejected.
Pass an empty slice for the bare family base.
Trait Implementations§
Source§impl Clone for EndpointConfig
impl Clone for EndpointConfig
Source§fn clone(&self) -> EndpointConfig
fn clone(&self) -> EndpointConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EndpointConfig
impl RefUnwindSafe for EndpointConfig
impl Send for EndpointConfig
impl Sync for EndpointConfig
impl Unpin for EndpointConfig
impl UnsafeUnpin for EndpointConfig
impl UnwindSafe for EndpointConfig
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