pub trait BindRawBsonRef: Sized {
type Target: BindHelper<Target = Self>;
// Provided method
fn bind<F, R>(self, f: F) -> R
where F: for<'a> FnOnce(RawBsonRef<'a>) -> R { ... }
}Expand description
Types that can be consumed to produce raw bson references valid for a limited lifetime.
Conceptually a union between T: Into<RawBson> and T: Into<RawBsonRef>; if your type
implements Into<RawBsonRef> it will automatically implement this, but if it
implements Into<RawBson> it will need to also define an impl of BindRawBsonRef:
impl BindRawBsonRef for MyType {
type Target = BindValue<Self>;
}Required Associated Types§
Provided Methods§
fn bind<F, R>(self, f: F) -> Rwhere
F: for<'a> FnOnce(RawBsonRef<'a>) -> R,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.