Skip to main content

LogOutline

Struct LogOutline 

Source
pub struct LogOutline {
    pub job: u64,
    pub evidence: LogEvidence,
    pub lines: u64,
    pub from: u64,
    pub groups: Vec<LogGroup>,
    pub steps: Vec<StepLines>,
    pub unattributed: Vec<LineRange>,
    pub errors: u64,
    pub warnings: u64,
    pub marks: Vec<LogMark>,
    pub capped: bool,
    pub failure: Option<FailureSummary>,
}
Expand description

GET /v1/jobs/{id}/log/outline: a job’s log as structure.

Fields§

§job: u64

The job.

§evidence: LogEvidence

How much of the log there is.

§lines: u64

Lines stored: they are numbered from 0 up to this, less any deleted.

§from: u64

The first line outlined; lines when none is.

§groups: Vec<LogGroup>

Its groups, by their first line.

§steps: Vec<StepLines>

Each stored step and its lines, in the job’s order.

§unattributed: Vec<LineRange>

The stored lines no step got.

§errors: u64

Error lines seen.

§warnings: u64

Warning lines seen.

§marks: Vec<LogMark>

The error and warning lines, up to 1000.

§capped: bool

Some groups or marks were only counted: more than it keeps.

§failure: Option<FailureSummary>

On a failed job: what its log says of the failure.

Implementations§

Source§

impl LogOutline

Source

pub fn count_words(lines: usize) -> String

How many lines a part of the log holds, as a fold says it: 1 line, 5 lines.

Source

pub fn tail_words(first: u64, shown: usize) -> Option<String>

What a client says when it outlines only the log’s last shown lines, first lines in: The last 5000 lines; the full log has the 1200 before them. None when it shows them all.

Source

pub fn assemble( job: &Job, stored: StoredLog, parts: OutlineParts, read: &mut dyn FnMut(LineRead) -> Vec<StoredLine>, ) -> LogOutline

Assembles a job’s outline from what the store keeps, all read at one time. read returns the stored lines a LineRead asks for: the start of the first and last line of each segment, and a failed step’s last lines, the most of them cut to a few hundred bytes.

Source

pub fn of(job: &Job, lines: &[String]) -> LogOutline

The outline of a whole log held in memory, as the store would keep it: for fixtures and the demo.

Source

pub fn step_lines(&self, number: u32) -> Option<LineRange>

The lines of step number, when known.

Trait Implementations§

Source§

impl Clone for LogOutline

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LogOutline

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for LogOutline

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for LogOutline

Source§

impl PartialEq for LogOutline

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for LogOutline

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for LogOutline

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more