pub struct Builder { /* private fields */ }Implementations§
Source§impl Builder
impl Builder
pub fn new() -> Self
pub fn with_url(&mut self, url: &str) -> &mut Self
pub fn with_api_key(&mut self, api_key: &str) -> &mut Self
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Create a new Oso client from environment variables.
The following environment variables are used:
OSO_URL- The URL of the Oso Cloud instance to connect to. Defaults tohttps://api.osohq.com.OSO_AUTH- The API key to use when connecting to Oso Cloud. Defaults to an empty string.
pub fn build(&self) -> Result<Oso, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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