pub struct Session { /* private fields */ }Expand description
Represents a session with Objectstore, tied to a specific Usecase and Scope within it.
Create a Session using Client::session or Scope::session.
Implementations§
Source§impl Session
impl Session
Sourcepub fn object_url(&self, object_key: &str) -> Url
pub fn object_url(&self, object_key: &str) -> Url
Generates a GET url to the object with the given key.
This can then be used by downstream services to fetch the given object.
NOTE however that the service does not strictly follow HTTP semantics,
in particular in relation to Accept-Encoding.
Source§impl Session
impl Session
Sourcepub fn delete(&self, key: &str) -> DeleteBuilder
pub fn delete(&self, key: &str) -> DeleteBuilder
Deletes the object with the given key.
Source§impl Session
impl Session
Sourcepub fn get(&self, key: &str) -> GetBuilder
pub fn get(&self, key: &str) -> GetBuilder
Retrieves the object with the given key.
Source§impl Session
impl Session
Sourcepub fn put(&self, body: impl Into<Bytes>) -> PutBuilder
pub fn put(&self, body: impl Into<Bytes>) -> PutBuilder
Creates or replaces an object using a [Bytes]-like payload.
Sourcepub fn put_stream(&self, body: ClientStream) -> PutBuilder
pub fn put_stream(&self, body: ClientStream) -> PutBuilder
Creates or replaces an object using a streaming payload.
Sourcepub fn put_read<R>(&self, body: R) -> PutBuilder
pub fn put_read<R>(&self, body: R) -> PutBuilder
Creates or replaces an object using an [AsyncRead] payload.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Session
impl !RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl !UnwindSafe for Session
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