libblobd_direct/incomplete_token.rs
1use crate::objects::ObjectId;
2use serde::Deserialize;
3use serde::Serialize;
4use std::fmt;
5use std::fmt::Debug;
6
7// This is intentionally an opaque token. To allow transporting it for library implementers, Serialize and Deserialize are derived.
8#[derive(Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
9pub struct IncompleteToken {
10 // WARNING: This will change after committing, so cannot be depended on. Currently, `IncompleteToken` is opaque so this is not an issue.
11 pub(crate) object_id: ObjectId,
12 pub(crate) partition_idx: usize,
13}
14
15impl Debug for IncompleteToken {
16 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
17 f.debug_struct("IncompleteToken").finish()
18 }
19}