wick_packet/
lib.rs

1#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/104781277?s=96&v=4")]
2#![doc = include_str!("../README.md")]
3// !!START_LINTS
4// Wick lints
5// Do not change anything between the START_LINTS and END_LINTS line.
6// This is automatically generated. Add exceptions after this section.
7#![allow(unknown_lints)]
8#![deny(
9  clippy::await_holding_lock,
10  clippy::borrow_as_ptr,
11  clippy::branches_sharing_code,
12  clippy::cast_lossless,
13  clippy::clippy::collection_is_never_read,
14  clippy::cloned_instead_of_copied,
15  clippy::cognitive_complexity,
16  clippy::create_dir,
17  clippy::deref_by_slicing,
18  clippy::derivable_impls,
19  clippy::derive_partial_eq_without_eq,
20  clippy::equatable_if_let,
21  clippy::exhaustive_structs,
22  clippy::expect_used,
23  clippy::expl_impl_clone_on_copy,
24  clippy::explicit_deref_methods,
25  clippy::explicit_into_iter_loop,
26  clippy::explicit_iter_loop,
27  clippy::filetype_is_file,
28  clippy::flat_map_option,
29  clippy::format_push_string,
30  clippy::fn_params_excessive_bools,
31  clippy::future_not_send,
32  clippy::get_unwrap,
33  clippy::implicit_clone,
34  clippy::if_then_some_else_none,
35  clippy::impl_trait_in_params,
36  clippy::implicit_clone,
37  clippy::inefficient_to_string,
38  clippy::inherent_to_string,
39  clippy::iter_not_returning_iterator,
40  clippy::large_types_passed_by_value,
41  clippy::large_include_file,
42  clippy::let_and_return,
43  clippy::manual_assert,
44  clippy::manual_ok_or,
45  clippy::manual_split_once,
46  clippy::manual_let_else,
47  clippy::manual_string_new,
48  clippy::map_flatten,
49  clippy::map_unwrap_or,
50  clippy::missing_enforced_import_renames,
51  clippy::missing_assert_message,
52  clippy::missing_const_for_fn,
53  clippy::must_use_candidate,
54  clippy::mut_mut,
55  clippy::needless_for_each,
56  clippy::needless_option_as_deref,
57  clippy::needless_pass_by_value,
58  clippy::needless_collect,
59  clippy::needless_continue,
60  clippy::non_send_fields_in_send_ty,
61  clippy::nonstandard_macro_braces,
62  clippy::option_if_let_else,
63  clippy::option_option,
64  clippy::rc_mutex,
65  clippy::redundant_else,
66  clippy::same_name_method,
67  clippy::semicolon_if_nothing_returned,
68  clippy::str_to_string,
69  clippy::string_to_string,
70  clippy::too_many_lines,
71  clippy::trivially_copy_pass_by_ref,
72  clippy::trivial_regex,
73  clippy::try_err,
74  clippy::unnested_or_patterns,
75  clippy::unused_async,
76  clippy::unwrap_or_else_default,
77  clippy::useless_let_if_seq,
78  bad_style,
79  clashing_extern_declarations,
80  dead_code,
81  deprecated,
82  explicit_outlives_requirements,
83  improper_ctypes,
84  invalid_value,
85  missing_copy_implementations,
86  missing_debug_implementations,
87  mutable_transmutes,
88  no_mangle_generic_items,
89  non_shorthand_field_patterns,
90  overflowing_literals,
91  path_statements,
92  patterns_in_fns_without_body,
93  private_in_public,
94  trivial_bounds,
95  trivial_casts,
96  trivial_numeric_casts,
97  type_alias_bounds,
98  unconditional_recursion,
99  unreachable_pub,
100  unsafe_code,
101  unstable_features,
102  unused,
103  unused_allocation,
104  unused_comparisons,
105  unused_import_braces,
106  unused_parens,
107  unused_qualifications,
108  while_true,
109  missing_docs
110)]
111#![warn(clippy::exhaustive_enums)]
112#![allow(unused_attributes, clippy::derive_partial_eq_without_eq, clippy::box_default)]
113// !!END_LINTS
114// Add exceptions here
115#![allow(missing_docs)]
116
117mod b64_bytes;
118mod collection_link;
119mod context;
120#[cfg(feature = "datetime")]
121mod datetime;
122mod entity;
123mod error;
124mod inherent;
125mod input;
126#[cfg(feature = "invocation")]
127mod invocation;
128mod macros;
129mod metadata;
130mod output;
131mod packet;
132mod packet_stream;
133mod stream_map;
134mod vpacket;
135mod wrapped_type;
136
137#[cfg(feature = "validation")]
138pub mod validation;
139
140pub use collection_link::ComponentReference;
141pub use context::{ContextTransport, InvocationRequest, RuntimeConfig};
142#[cfg(feature = "datetime")]
143pub use datetime::{date_from_millis, parse_date, serde, DateTime};
144pub use entity::Entity;
145pub use error::{Error, ParseError};
146pub use inherent::InherentData;
147pub use input::{BinaryInputs, UnaryInputs};
148#[cfg(feature = "invocation")]
149pub use invocation::{Invocation, InvocationData};
150pub use metadata::{Flags, WickMetadata, CLOSE_BRACKET, DONE_FLAG, OPEN_BRACKET};
151pub use output::{OutgoingPort, OutputIterator, Port, ValuePort, WasmRsChannel};
152pub use packet::{from_raw_wasmrs, from_wasmrs, packetstream_to_wasmrs, Packet, PacketError, PacketExt, PacketPayload};
153pub use packet_stream::{into_packet, BoxStream, PacketSender, PacketStream};
154pub use stream_map::StreamMap;
155pub use vpacket::VPacket;
156pub use wasmrs::Metadata;
157pub use wasmrs_rx;
158pub use wasmrs_rx::{Flux, FluxChannel, FluxReceiver, Mono, Observable, Observer};
159pub use wrapped_type::TypeWrapper;
160
161#[cfg(feature = "rt-tokio")]
162mod runtime;
163pub use b64_bytes::Base64Bytes;
164#[cfg(feature = "rt-tokio")]
165pub use runtime::split_stream;
166
167pub(crate) type Result<T> = std::result::Result<T, Error>;