pub struct OfficialNetworkApi { /* private fields */ }Expand description
Builds paths and URLs under a controller’s official integration API.
Implementations§
Source§impl OfficialNetworkApi
impl OfficialNetworkApi
Sourcepub fn new(base_url: impl Into<String>) -> Self
pub fn new(base_url: impl Into<String>) -> Self
base_url is the controller’s base URL, e.g. https://unifi.local; a
trailing slash is trimmed.
Sourcepub fn path(&self, path: &str) -> String
pub fn path(&self, path: &str) -> String
Maps a capability-catalog path (e.g. v1/sites) onto the official
integration API’s request path.
Connector actions (ConnectorGet/Post/Put/Patch/Delete) can
substitute a *path wildcard that is already fully qualified under
/proxy/network/integration/ or /proxy/protect/integration/ (see
crate::api::path::validate_connector_path) — pass those through
unchanged rather than prefixing them a second time.
Sourcepub fn url(&self, path: &str) -> String
pub fn url(&self, path: &str) -> String
Self::path, joined onto this API’s base URL.
Trait Implementations§
Source§impl Clone for OfficialNetworkApi
impl Clone for OfficialNetworkApi
Source§fn clone(&self) -> OfficialNetworkApi
fn clone(&self) -> OfficialNetworkApi
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 OfficialNetworkApi
impl RefUnwindSafe for OfficialNetworkApi
impl Send for OfficialNetworkApi
impl Sync for OfficialNetworkApi
impl Unpin for OfficialNetworkApi
impl UnsafeUnpin for OfficialNetworkApi
impl UnwindSafe for OfficialNetworkApi
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