pub struct ObjDest(/* private fields */);Expand description
Search data destination. Contains collection, bucket and object.
Implementations§
Source§impl ObjDest
impl ObjDest
Sourcepub fn new(cb: Dest, o: impl ToString) -> Self
pub fn new(cb: Dest, o: impl ToString) -> Self
Creates a new object destination from base destination (Dest) and object id.
let base_dest = Dest::col_buc("wiki", "user:1");
let dest = ObjDest::new(base_dest, "article:1");
assert_eq!(dest.collection(), "wiki");
assert_eq!(dest.bucket_opt(), Some(&String::from("user:1")));
assert_eq!(dest.object(), "article:1");Sourcepub fn collection(&self) -> &String
pub fn collection(&self) -> &String
Returns the collection.
Sourcepub fn bucket_opt(&self) -> Option<&String>
pub fn bucket_opt(&self) -> Option<&String>
Returns the optional bucket.
Trait Implementations§
Source§impl From<ObjDest> for CountRequest
impl From<ObjDest> for CountRequest
Source§impl From<ObjDest> for FlushRequest
impl From<ObjDest> for FlushRequest
impl Eq for ObjDest
impl StructuralPartialEq for ObjDest
Auto Trait Implementations§
impl Freeze for ObjDest
impl RefUnwindSafe for ObjDest
impl Send for ObjDest
impl Sync for ObjDest
impl Unpin for ObjDest
impl UnwindSafe for ObjDest
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