You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: typesense/src/client/collection/document.rs
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -13,19 +13,19 @@ use typesense_codegen::apis::documents_api;
13
13
/// This struct is created by calling a method like `client.collection("collection_name").document("document_id")` or `client.collection_of::<MyType>("collection_name").document("document_id")`.
14
14
/// The generic `T` represents the shape of the document and must implement `Serialize` and `DeserializeOwned`.
15
15
/// If `T` is not specified, it defaults to `serde_json::Value` for schemaless interactions.
16
-
pubstructDocument<'c,'n,T = serde_json::Value>
16
+
pubstructDocument<'c,'n,D = serde_json::Value>
17
17
where
18
-
T:DeserializeOwned + Serialize + Send + Sync,
18
+
D:DeserializeOwned + Serialize + Send + Sync,
19
19
{
20
20
pub(super)client:&'cClient,
21
21
pub(super)collection_name:&'nstr,
22
22
pub(super)document_id:String,
23
-
pub(super)_phantom: std::marker::PhantomData<T>,
23
+
pub(super)_phantom: std::marker::PhantomData<D>,
24
24
}
25
25
26
-
impl<'c,'n,T>Document<'c,'n,T>
26
+
impl<'c,'n,D>Document<'c,'n,D>
27
27
where
28
-
T:DeserializeOwned + Serialize + Send + Sync,
28
+
D:DeserializeOwned + Serialize + Send + Sync,
29
29
{
30
30
/// Creates a new `Document` instance for a specific document ID.
31
31
#[inline]
@@ -42,7 +42,7 @@ where
42
42
///
43
43
/// # Returns
44
44
/// A `Result` containing the strongly-typed document `T` if successful.
0 commit comments