pub struct InternalNetworkApi { /* private fields */ }Expand description
Builds paths and URLs under a controller’s internal, per-site API.
Implementations§
Source§impl InternalNetworkApi
impl InternalNetworkApi
Sourcepub fn new(
base_url: impl Into<String>,
site: impl Into<String>,
legacy: bool,
) -> Self
pub fn new( base_url: impl Into<String>, site: impl Into<String>, legacy: bool, ) -> Self
base_url is the controller’s base URL (trailing slash trimmed);
site is the site slug; legacy selects controllers without the
/proxy/network prefix.
Sourcepub fn v1_site_path(&self, suffix: &str) -> String
pub fn v1_site_path(&self, suffix: &str) -> String
Builds a v1-style per-site path: /api/s/{site}/{suffix}, prefixed
with /proxy/network unless this is a legacy controller.
Sourcepub fn v2_site_path(&self, suffix: &str) -> String
pub fn v2_site_path(&self, suffix: &str) -> String
Builds a v2-style per-site path: /v2/api/site/{site}/{suffix},
prefixed with /proxy/network unless this is a legacy controller.
Trait Implementations§
Source§impl Clone for InternalNetworkApi
impl Clone for InternalNetworkApi
Source§fn clone(&self) -> InternalNetworkApi
fn clone(&self) -> InternalNetworkApi
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 InternalNetworkApi
impl RefUnwindSafe for InternalNetworkApi
impl Send for InternalNetworkApi
impl Sync for InternalNetworkApi
impl Unpin for InternalNetworkApi
impl UnsafeUnpin for InternalNetworkApi
impl UnwindSafe for InternalNetworkApi
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