pub struct Endpoint<'a> { /* private fields */ }Implementations§
Source§impl<'a> Endpoint<'a>
impl<'a> Endpoint<'a>
Sourcepub fn new(client: &'a Nomad) -> Self
pub fn new(client: &'a Nomad) -> Self
Create a new Endpoint with the given Nomad client to interact with
the node pool endpoints.
pub async fn create( &self, node_pool: &NodePool, opts: Option<WriteOptions>, ) -> Result<(), ClientError>
pub async fn delete( &self, name: &str, opts: Option<WriteOptions>, ) -> Result<(), ClientError>
pub async fn get( &self, name: &str, opts: Option<QueryOptions>, ) -> Result<NodePool, ClientError>
pub async fn list( &self, opts: Option<QueryOptions>, ) -> Result<Vec<NodePool>, ClientError>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Endpoint<'a>
impl<'a> !UnwindSafe for Endpoint<'a>
impl<'a> Freeze for Endpoint<'a>
impl<'a> Send for Endpoint<'a>
impl<'a> Sync for Endpoint<'a>
impl<'a> Unpin for Endpoint<'a>
impl<'a> UnsafeUnpin for Endpoint<'a>
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