Struct VisuClient
pub struct VisuClient {
pub uri: String,
pub timeout_s: f64,
pub identifier: Option<String>,
pub model: ModelRouter,
pub material: MaterialRouter,
pub obj: ObjectRouter,
pub anchor: AnchorRouter,
pub meta: MetaRouter,
pub live: LiveRouter,
/* private fields */
}Expand description
The client router for the REST API root endpoints.
Fields§
§uri: StringThe fully qualified API URI ({uri}/api/).
timeout_s: f64The request timeout in seconds.
identifier: Option<String>The client identifier marking the originating source of objects.
model: ModelRouterThe model sub-router.
material: MaterialRouterThe material sub-router.
obj: ObjectRouterThe object sub-router.
anchor: AnchorRouterThe anchor sub-router.
meta: MetaRouterThe meta sub-router.
live: LiveRouterThe live data sub-router (websocket).
Implementations§
§impl VisuClient
impl VisuClient
pub fn new(
uri: &str,
ignore_meta_check: bool,
identifier: Option<String>,
) -> Result<Self>
pub fn new( uri: &str, ignore_meta_check: bool, identifier: Option<String>, ) -> Result<Self>
Creates a new client router rooted at uri.
Unless ignore_meta_check is set, the server name and version are
verified against the client.
pub fn with_timeout(
uri: &str,
ignore_meta_check: bool,
identifier: Option<String>,
timeout_s: f64,
) -> Result<Self>
pub fn with_timeout( uri: &str, ignore_meta_check: bool, identifier: Option<String>, timeout_s: f64, ) -> Result<Self>
Creates a new client router with an explicit request timeout.
§Errors
Returns Error::Value if timeout_s is
negative, non-finite or too large to be represented as a duration.
pub fn clear_source(&self) -> Result<()>
pub fn clear_source(&self) -> Result<()>
Clears all objects and materials originating from this client’s source.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VisuClient
impl !RefUnwindSafe for VisuClient
impl Send for VisuClient
impl Sync for VisuClient
impl Unpin for VisuClient
impl !UnwindSafe for VisuClient
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