Skip to main content

blob_subject

Function blob_subject 

Source
pub fn blob_subject<'a>(
    account: &'a str,
    kind: SubjectKind<'a>,
    handle: Option<&'a str>,
    pds_did: &'a str,
    pds_hostname: &'a str,
    client_id: Option<&'a ClientId>,
    mime_type: &'a str,
    sniffed: Option<&'a str>,
    size: Option<u64>,
    now: OffsetDateTime,
) -> Subject<'a>
Expand description

Builds the Subject::Blob a gate judges one upload against.

sniffed and size are what is known when the judgment happens: an upload is judged on what the request declares, before a byte is read, again while the bytes arrive, and once they are in. now is the instant the request is judged at.