@@ -27,6 +27,27 @@ macro_rules! ray {
2727 } } ;
2828}
2929
30+ #[ macro_export]
31+ macro_rules! rd {
32+ ( ) => { {
33+ Ray :: new( )
34+
35+ todo!( "Need to add die" ) ;
36+ } } ;
37+ ( $( $arg: expr) ,* ) => { {
38+ let mut ray = Ray :: new( ) ;
39+ let mut vec = Vec :: new( ) ;
40+
41+ $( vec. push( format!( "{:#?}" , $arg) ) ; ) *
42+
43+ ray. log( vec) ;
44+
45+ ray
46+
47+ todo!( "Need to add die" ) ;
48+ } } ;
49+ }
50+
3051#[ derive( Debug , Serialize , Deserialize , Clone ) ]
3152pub struct RayPayload {
3253 uuid : String ,
@@ -116,6 +137,22 @@ impl Ray {
116137 self
117138 }
118139
140+ pub fn clear_all ( & mut self ) -> & mut Self {
141+ let message = RayMessage :: ClearAll ( RayClearAll {
142+ label : RayMessageType :: ClearAll ,
143+ } ) ;
144+
145+ let content = RayContent {
146+ content_type : RayClearAll :: get_type ( ) ,
147+ origin : RayOrigin :: new ( ) ,
148+ content : message,
149+ } ;
150+
151+ self . request . payloads . push ( content) ;
152+
153+ self . send ( )
154+ }
155+
119156 pub fn log ( & mut self , values : Vec < String > ) -> & mut Self {
120157 let message = RayMessage :: Log ( RayLog {
121158 label : RayMessageType :: Log ,
@@ -182,4 +219,170 @@ impl Ray {
182219
183220 self . send ( )
184221 }
222+
223+ pub fn confetti ( & mut self ) -> & mut Self {
224+ let message = RayMessage :: Confetti ( RayConfetti {
225+ label : RayMessageType :: Confetti ,
226+ } ) ;
227+
228+ let content = RayContent {
229+ content_type : RayConfetti :: get_type ( ) ,
230+ origin : RayOrigin :: new ( ) ,
231+ content : message,
232+ } ;
233+
234+ self . request . payloads . push ( content) ;
235+
236+ self . send ( )
237+ }
238+
239+ pub fn count ( & mut self ) -> & mut Self {
240+ todo ! ( ) ;
241+ }
242+
243+ pub fn counter_value ( & mut self ) -> & mut Self {
244+ todo ! ( ) ;
245+ }
246+
247+ pub fn die ( & mut self ) -> & mut Self {
248+ todo ! ( ) ;
249+ }
250+
251+ pub fn disable ( & mut self ) -> & mut Self {
252+ todo ! ( ) ;
253+ }
254+
255+ pub fn disabled ( & mut self ) -> & mut Self {
256+ todo ! ( ) ;
257+ }
258+
259+ pub fn enable ( & mut self ) -> & mut Self {
260+ todo ! ( ) ;
261+ }
262+
263+ pub fn enabled ( & mut self ) -> & mut Self {
264+ todo ! ( ) ;
265+ }
266+
267+ pub fn file ( & mut self ) -> & mut Self {
268+ todo ! ( ) ;
269+ }
270+
271+ pub fn gray ( & mut self ) -> & mut Self {
272+ todo ! ( ) ;
273+ }
274+
275+ pub fn green ( & mut self ) -> & mut Self {
276+ todo ! ( ) ;
277+ }
278+
279+ pub fn hide ( & mut self ) -> & mut Self {
280+ todo ! ( ) ;
281+ }
282+
283+ pub fn hide_app ( & mut self ) -> & mut Self {
284+ todo ! ( ) ;
285+ }
286+
287+ pub fn image ( & mut self ) -> & mut Self {
288+ todo ! ( ) ;
289+ }
290+
291+ // I'm not sure if this is possible in Rust
292+ pub fn r#if ( & mut self ) -> & mut Self {
293+ todo ! ( ) ;
294+ }
295+
296+ pub fn json ( & mut self ) -> & mut Self {
297+ todo ! ( ) ;
298+ }
299+
300+ pub fn label ( & mut self ) -> & mut Self {
301+ todo ! ( ) ;
302+ }
303+
304+ pub fn large ( & mut self ) -> & mut Self {
305+ todo ! ( ) ;
306+ }
307+
308+ pub fn limit ( & mut self ) -> & mut Self {
309+ todo ! ( ) ;
310+ }
311+
312+ pub fn link ( & mut self ) -> & mut Self {
313+ todo ! ( ) ;
314+ }
315+
316+ pub fn measure ( & mut self ) -> & mut Self {
317+ todo ! ( ) ;
318+ }
319+
320+ pub fn new_screen ( & mut self ) -> & mut Self {
321+ todo ! ( ) ;
322+ }
323+
324+ pub fn notify ( & mut self ) -> & mut Self {
325+ todo ! ( ) ;
326+ }
327+
328+ pub fn orange ( & mut self ) -> & mut Self {
329+ todo ! ( ) ;
330+ }
331+
332+ pub fn pass ( & mut self ) -> & mut Self {
333+ todo ! ( ) ;
334+ }
335+
336+ pub fn pause ( & mut self ) -> & mut Self {
337+ todo ! ( ) ;
338+ }
339+
340+ pub fn info ( & mut self ) -> & mut Self {
341+ todo ! ( ) ;
342+ }
343+
344+ pub fn purple ( & mut self ) -> & mut Self {
345+ todo ! ( ) ;
346+ }
347+
348+ // TODO: This has 3 functions max, per_second and clear
349+ pub fn rate_limiter ( & mut self ) -> & mut Self {
350+ todo ! ( ) ;
351+ }
352+
353+ pub fn red ( & mut self ) -> & mut Self {
354+ todo ! ( ) ;
355+ }
356+
357+ pub fn separator ( & mut self ) -> & mut Self {
358+ todo ! ( ) ;
359+ }
360+
361+ pub fn show_app ( & mut self ) -> & mut Self {
362+ todo ! ( ) ;
363+ }
364+
365+ pub fn small ( & mut self ) -> & mut Self {
366+ todo ! ( ) ;
367+ }
368+
369+ pub fn table ( & mut self ) -> & mut Self {
370+ todo ! ( ) ;
371+ }
372+
373+ pub fn to_json ( & mut self ) -> & mut Self {
374+ todo ! ( ) ;
375+ }
376+
377+ pub fn trace ( & mut self ) -> & mut Self {
378+ todo ! ( ) ;
379+ }
380+
381+ pub fn url ( & mut self ) -> & mut Self {
382+ todo ! ( ) ;
383+ }
384+
385+ pub fn xml ( & mut self ) -> & mut Self {
386+ todo ! ( ) ;
387+ }
185388}
0 commit comments