pub struct Document {
pub key: String,
pub payload: Value,
pub state: Option<String>,
pub updated_at: Option<String>,
pub complete: bool,
pub fetched_at: String,
}Expand description
One document, as GitHub last described it.
Fields§
§key: StringWhat identifies it inside its scope: an issue number, a gist id, a tag name, a project item id.
payload: Value§state: Option<String>§updated_at: Option<String>§complete: boolWhether the payload is the whole thing rather than a list summary.
fetched_at: StringImplementations§
Source§impl Document
impl Document
Sourcepub fn of(key: impl Into<String>, payload: Value) -> Self
pub fn of(key: impl Into<String>, payload: Value) -> Self
One document from a value GitHub sent, with the columns a query needs pulled out of it.
The extraction is by field NAME, which is the same name in every kind
GitHub returns — state and updated_at. A kind that carries neither
stores neither, and is read back whole.
Sourcepub fn summary(key: impl Into<String>, payload: Value) -> Self
pub fn summary(key: impl Into<String>, payload: Value) -> Self
The same, for a payload that is a summary rather than the whole thing.
Sourcepub fn with_state(self, state: impl Into<String>) -> Self
pub fn with_state(self, state: impl Into<String>) -> Self
The same, with a state this kind does not carry in its payload.
Trait Implementations§
impl Eq for Document
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.