Struct sonic_channel::ObjDest
source · [−]pub struct ObjDest(_, _);
Expand description
Search data destination. Contains collection, bucket and object.
Implementations
sourceimpl 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
sourceimpl From<ObjDest> for CountRequest
impl From<ObjDest> for CountRequest
sourceimpl From<ObjDest> for FlushRequest
impl From<ObjDest> for FlushRequest
impl Eq for ObjDest
impl StructuralEq for ObjDest
impl StructuralPartialEq for ObjDest
Auto Trait Implementations
impl RefUnwindSafe for ObjDest
impl Send for ObjDest
impl Sync for ObjDest
impl Unpin for ObjDest
impl UnwindSafe for ObjDest
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