pub struct ForgeEvent {
pub repo: String,
pub pull: u64,
pub actor: String,
pub at_unix_ms: i64,
pub event: Event,
}Expand description
One event on one pull request, before it is signed.
Fields§
§repo: String<namespace>/<repo> this belongs to.
pull: u64Which pull request — crate::pulls::PullRecord::number.
Assigned by PullRequests.Create, not here: the number is inside the
signature, so it has to be known before an event is signed, and a second
numbering authority is exactly the twin this design avoids.
actor: StringThe ACL principal that did it.
at_unix_ms: i64When.
event: EventWhat.
Implementations§
Source§impl ForgeEvent
impl ForgeEvent
Sourcepub fn signing_bytes(&self) -> Vec<u8> ⓘ
pub fn signing_bytes(&self) -> Vec<u8> ⓘ
The exact bytes that are signed.
Line-oriented and fixed-order, for the same reason a tree head and a build record are: JSON has no canonical form, so signing a serialisation makes the signature depend on the serialiser. The body is length-prefixed rather than escaped, so a comment containing a newline cannot be made to look like two fields.
Trait Implementations§
Source§impl Clone for ForgeEvent
impl Clone for ForgeEvent
Source§impl Debug for ForgeEvent
impl Debug for ForgeEvent
Source§impl<'de> Deserialize<'de> for ForgeEvent
impl<'de> Deserialize<'de> for ForgeEvent
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 Eq for ForgeEvent
Source§impl PartialEq for ForgeEvent
impl PartialEq for ForgeEvent
Source§impl Serialize for ForgeEvent
impl Serialize for ForgeEvent
impl StructuralPartialEq for ForgeEvent
Auto Trait Implementations§
impl Freeze for ForgeEvent
impl RefUnwindSafe for ForgeEvent
impl Send for ForgeEvent
impl Sync for ForgeEvent
impl Unpin for ForgeEvent
impl UnsafeUnpin for ForgeEvent
impl UnwindSafe for ForgeEvent
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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