#[non_exhaustive]pub struct Thread {
pub id: String,
pub object: String,
pub created_at: u64,
pub tool_resources: Option<Value>,
pub metadata: BTreeMap<String, String>,
pub extra: BTreeMap<String, Value>,
/* private fields */
}Expand description
EN: Thread object returned by the Threads API. 中文:Threads API 返回的 Thread 对象。
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringEN: Thread id. 中文:Thread ID。
object: StringEN: API object type. 中文:API 对象类型。
created_at: u64EN: Unix timestamp for creation. 中文:创建时间的 Unix 时间戳。
tool_resources: Option<Value>EN: Tool resources returned by the API, when present. 中文:API 返回的工具资源,如存在。
metadata: BTreeMap<String, String>EN: Metadata returned by the API. 中文:API 返回的元数据。
extra: BTreeMap<String, Value>EN: Additional fields preserved for forward compatibility. 中文:为前向兼容保留的额外字段。
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Thread
impl<'de> Deserialize<'de> for Thread
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Thread
Auto Trait Implementations§
impl Freeze for Thread
impl RefUnwindSafe for Thread
impl Send for Thread
impl Sync for Thread
impl Unpin for Thread
impl UnsafeUnpin for Thread
impl UnwindSafe for Thread
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