pub enum SourceClass {
Project,
External(InputOrigin),
Unclassified {
tool: &'static str,
},
}Expand description
The class a caller of the admission core states for the text it admits.
Variants§
Project
A project file through the rooted reader, or the project’s own commands and Instance-internal text.
External(InputOrigin)
Text from an untrusted origin.
Unclassified
The caller cannot say. Handled exactly like untrusted (Rule U).
tool names the admitting caller; it is content-free.
Implementations§
Source§impl SourceClass
impl SourceClass
Sourcepub fn origin_floor(&self) -> TrustLevelV1
pub fn origin_floor(&self) -> TrustLevelV1
The highest trust this class allows, before any content finding.
Sourcepub fn is_external_or_unknown(&self) -> bool
pub fn is_external_or_unknown(&self) -> bool
Text of this class is handled as untrusted (Rule U).
Sourcepub fn input_ref(&self) -> Option<InputRef>
pub fn input_ref(&self) -> Option<InputRef>
The content-free ledger key of an external or unknown class:
External(o) gives (o.kind, o.ref), Unclassified { tool } gives
(tool_output, "unknown:<tool>"). None for Project, and for a
reference that cannot be recorded (the caller then marks overflow).
Trait Implementations§
Source§impl Clone for SourceClass
impl Clone for SourceClass
Source§impl Debug for SourceClass
impl Debug for SourceClass
impl Eq for SourceClass
Source§impl Hash for SourceClass
impl Hash for SourceClass
Source§impl PartialEq for SourceClass
impl PartialEq for SourceClass
impl StructuralPartialEq for SourceClass
Auto Trait Implementations§
impl Forget for SourceClass
impl Freeze for SourceClass
impl Move for SourceClass
impl RefUnwindSafe for SourceClass
impl Send for SourceClass
impl Sync for SourceClass
impl Unpin for SourceClass
impl UnsafeUnpin for SourceClass
impl UnwindSafe for SourceClass
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more