Struct seaplane_cli::api::MetadataReq
source · pub struct MetadataReq { /* private fields */ }Expand description
Wraps an SDK MetadataRequest where we do additional things like re-use request access
tokens, allow changing the Formation this request is pointed to, and map errors appropriately.
Implementations
sourceimpl MetadataReq
impl MetadataReq
pub fn new(ctx: &Ctx) -> Result<Self>
pub fn set_key<S: Into<String>>(&mut self, key: S) -> Result<()>
pub fn set_dir(&mut self, dir: RangeQueryContext<Key>) -> Result<()>
sourcepub fn refresh_token(&mut self) -> Result<()>
pub fn refresh_token(&mut self) -> Result<()>
Request a new Access Token
sourcepub fn token_or_refresh(&mut self) -> Result<&str>
pub fn token_or_refresh(&mut self) -> Result<&str>
Retrieves the JWT access token, requesting a new one if required.
sourceimpl MetadataReq
impl MetadataReq
pub fn get_value(&mut self) -> Result<ValueModel>
pub fn put_value_unencoded<S: AsRef<[u8]>>(&mut self, value: S) -> Result<()>
pub fn put_value(&mut self, value: ValueModel) -> Result<()>
pub fn delete_value(&mut self) -> Result<()>
pub fn get_page(&mut self) -> Result<KeyValueRangeModel>
pub fn get_all_pages(&mut self) -> Result<Vec<KeyValueModel>>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for MetadataReq
impl Send for MetadataReq
impl Sync for MetadataReq
impl Unpin for MetadataReq
impl !UnwindSafe for MetadataReq
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more