pub enum Format {
Any,
Plain,
Json,
Yaml,
Xml,
Base64,
}Expand description
What a tool’s text is, so a chain can refuse a link that cannot work.
Deliberately coarse. This exists to keep “send my list of names to the JSON formatter” out of a menu, not to type-check a pipeline; anything finer would tax every future tool for no gain.
Variants§
Any
No claim made — the text could be anything. What a decoder produces, and what a tool that takes arbitrary text accepts.
Plain
Human-readable text that is not structured data: a digest, a report, a list of names. Nothing parses it, so it flows nowhere in particular.
Json
Yaml
Xml
Base64
Implementations§
Source§impl Format
impl Format
Sourcepub fn flows_into(self, accepted: &[Format]) -> bool
pub fn flows_into(self, accepted: &[Format]) -> bool
Whether text of this format can be fed to a tool accepting accepted.
Any on either side waves the check through, and that is the point:
Base64-decode declares its output Any because it genuinely does not
know, which keeps the everyday chain — decode this, now pretty-print
it — in the menu. Only a format that is known and wrong is refused.
Trait Implementations§
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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
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§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
key and return true if they are equal.