pub struct ListerOptionsBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> ListerOptionsBuilder<S>
impl<S: State> ListerOptionsBuilder<S>
Sourcepub fn build(self) -> ListerOptionswhere
S: IsComplete,
pub fn build(self) -> ListerOptionswhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn sort(self, value: SortKeys) -> ListerOptionsBuilder<SetSort<S>>where
S::Sort: IsUnset,
pub fn sort(self, value: SortKeys) -> ListerOptionsBuilder<SetSort<S>>where
S::Sort: IsUnset,
Optional (Some / Option setters).
Ordering request passed as --sort=SORT using SortKeys’ display syntax.
SortKeys uses a - prefix for descending keys. This is the SDK’s
representation, not a universally supported PPS grammar; the program
must support both the option and the resulting expression. None omits
the request and uses the program’s documented default order.
Sourcepub fn maybe_sort(
self,
value: Option<SortKeys>,
) -> ListerOptionsBuilder<SetSort<S>>where
S::Sort: IsUnset,
pub fn maybe_sort(
self,
value: Option<SortKeys>,
) -> ListerOptionsBuilder<SetSort<S>>where
S::Sort: IsUnset,
Optional (Some / Option setters).
Ordering request passed as --sort=SORT using SortKeys’ display syntax.
SortKeys uses a - prefix for descending keys. This is the SDK’s
representation, not a universally supported PPS grammar; the program
must support both the option and the resulting expression. None omits
the request and uses the program’s documented default order.
Sourcepub fn offset(self, value: usize) -> ListerOptionsBuilder<SetOffset<S>>where
S::Offset: IsUnset,
pub fn offset(self, value: usize) -> ListerOptionsBuilder<SetOffset<S>>where
S::Offset: IsUnset,
Optional (Some / Option setters).
Number of entries to skip, passed as --offset=COUNT.
None omits the option (default 0); Some(0) explicitly skips none.
Offset is applied after sorting and before the limit. Programs may omit
native support. Do not combine an offset, even Some(0), with before
or after; these are alternative pagination modes.
Sourcepub fn maybe_offset(
self,
value: Option<usize>,
) -> ListerOptionsBuilder<SetOffset<S>>where
S::Offset: IsUnset,
pub fn maybe_offset(
self,
value: Option<usize>,
) -> ListerOptionsBuilder<SetOffset<S>>where
S::Offset: IsUnset,
Optional (Some / Option setters).
Number of entries to skip, passed as --offset=COUNT.
None omits the option (default 0); Some(0) explicitly skips none.
Offset is applied after sorting and before the limit. Programs may omit
native support. Do not combine an offset, even Some(0), with before
or after; these are alternative pagination modes.
Sourcepub fn before(
self,
value: impl Into<String>,
) -> ListerOptionsBuilder<SetBefore<S>>where
S::Before: IsUnset,
pub fn before(
self,
value: impl Into<String>,
) -> ListerOptionsBuilder<SetBefore<S>>where
S::Before: IsUnset,
Optional (Some / Option setters).
Exclusive upper cursor bound, passed as --before=URI.
The URI identifies an entry by its JSON-LD @id; it is an absolute URI
string, not a JSON object or an opaque encoded cursor. Select entries
before that entry in the chosen sort order. May be combined with after
to bound an interval, but not with numeric offset. None omits the bound.
The options value stores this string without validation or normalization.
Sourcepub fn maybe_before(
self,
value: Option<impl Into<String>>,
) -> ListerOptionsBuilder<SetBefore<S>>where
S::Before: IsUnset,
pub fn maybe_before(
self,
value: Option<impl Into<String>>,
) -> ListerOptionsBuilder<SetBefore<S>>where
S::Before: IsUnset,
Optional (Some / Option setters).
Exclusive upper cursor bound, passed as --before=URI.
The URI identifies an entry by its JSON-LD @id; it is an absolute URI
string, not a JSON object or an opaque encoded cursor. Select entries
before that entry in the chosen sort order. May be combined with after
to bound an interval, but not with numeric offset. None omits the bound.
The options value stores this string without validation or normalization.
Sourcepub fn after(
self,
value: impl Into<String>,
) -> ListerOptionsBuilder<SetAfter<S>>where
S::After: IsUnset,
pub fn after(
self,
value: impl Into<String>,
) -> ListerOptionsBuilder<SetAfter<S>>where
S::After: IsUnset,
Optional (Some / Option setters).
Exclusive lower cursor bound, passed as --after=URI.
The URI identifies an entry by its JSON-LD @id. Select entries after
that entry in the chosen sort order. May be combined with before, but
not with numeric offset. None omits the bound. As with before, the
options value stores the absolute URI string without validating it.
Sourcepub fn maybe_after(
self,
value: Option<impl Into<String>>,
) -> ListerOptionsBuilder<SetAfter<S>>where
S::After: IsUnset,
pub fn maybe_after(
self,
value: Option<impl Into<String>>,
) -> ListerOptionsBuilder<SetAfter<S>>where
S::After: IsUnset,
Optional (Some / Option setters).
Exclusive lower cursor bound, passed as --after=URI.
The URI identifies an entry by its JSON-LD @id. Select entries after
that entry in the chosen sort order. May be combined with before, but
not with numeric offset. None omits the bound. As with before, the
options value stores the absolute URI string without validating it.
Sourcepub fn limit(self, value: usize) -> ListerOptionsBuilder<SetLimit<S>>where
S::Limit: IsUnset,
pub fn limit(self, value: usize) -> ListerOptionsBuilder<SetLimit<S>>where
S::Limit: IsUnset,
Optional (Some / Option setters).
Requested listing limit (--limit=COUNT, or -n, when forwarded natively).
None imposes no caller-requested limit; Some(0) requests no entries.
ListerCapabilities::limit describes native support. A host can enforce
the request even when the native flag is unsupported, and independently
cap output to protect against bugs in programs that do accept the flag.
The program contract counts complete entries, not RDF statements, lines,
or bytes; consult the runner’s listing behavior for its
additional line-based cap and zero-limit handling. This options value
does not validate entry boundaries.
Sourcepub fn maybe_limit(
self,
value: Option<usize>,
) -> ListerOptionsBuilder<SetLimit<S>>where
S::Limit: IsUnset,
pub fn maybe_limit(
self,
value: Option<usize>,
) -> ListerOptionsBuilder<SetLimit<S>>where
S::Limit: IsUnset,
Optional (Some / Option setters).
Requested listing limit (--limit=COUNT, or -n, when forwarded natively).
None imposes no caller-requested limit; Some(0) requests no entries.
ListerCapabilities::limit describes native support. A host can enforce
the request even when the native flag is unsupported, and independently
cap output to protect against bugs in programs that do accept the flag.
The program contract counts complete entries, not RDF statements, lines,
or bytes; consult the runner’s listing behavior for its
additional line-based cap and zero-limit handling. This options value
does not validate entry boundaries.
Sourcepub fn output(
self,
value: impl Into<String>,
) -> ListerOptionsBuilder<SetOutput<S>>where
S::Output: IsUnset,
pub fn output(
self,
value: impl Into<String>,
) -> ListerOptionsBuilder<SetOutput<S>>where
S::Output: IsUnset,
Sourcepub fn maybe_output(
self,
value: Option<impl Into<String>>,
) -> ListerOptionsBuilder<SetOutput<S>>where
S::Output: IsUnset,
pub fn maybe_output(
self,
value: Option<impl Into<String>>,
) -> ListerOptionsBuilder<SetOutput<S>>where
S::Output: IsUnset,
Source§impl<S: State> ListerOptionsBuilder<S>
impl<S: State> ListerOptionsBuilder<S>
Sourcepub fn other(self, flag: impl Into<String>) -> Self
pub fn other(self, flag: impl Into<String>) -> Self
Appends one literal argument to ListerOptions::other, preserving order.
Sourcepub fn maybe_other(self, flag: Option<impl Into<String>>) -> Self
pub fn maybe_other(self, flag: Option<impl Into<String>>) -> Self
Appends a present argument to ListerOptions::other; None adds nothing.