qrkit/content
Domain-specific helpers that produce QR-ready payload strings.
Types
pub opaque type CalendarEvent
pub type WifiSecurity {
Open
Wep
Wpa
Wpa2
Wpa3
}
Constructors
-
Open -
Wep -
Wpa -
Wpa2 -
Wpa3
Values
pub fn email(
to to: String,
subject subject: String,
body body: String,
) -> String
Build a mailto: payload.
pub fn event(
title title: String,
start_unix start_unix: Int,
end_unix end_unix: Int,
) -> CalendarEvent
Create a calendar event payload builder.
pub fn event_to_string(event: CalendarEvent) -> String
Render a calendar event as an iCalendar payload.
pub fn geo(
latitude latitude: Float,
longitude longitude: Float,
) -> String
Build a geo URI.
pub fn vcard_to_string(card: VCard) -> String
Render the vCard as a text payload.
pub fn wifi(
ssid ssid: String,
password password: String,
security security: WifiSecurity,
hidden hidden: Bool,
) -> String
Build a WiFi payload string.
pub fn with_all_day(
event: CalendarEvent,
all_day: Bool,
) -> CalendarEvent
Toggle all-day rendering.
pub fn with_description(
event: CalendarEvent,
desc: String,
) -> CalendarEvent
Set the event description.
pub fn with_location(
event: CalendarEvent,
loc: String,
) -> CalendarEvent
Set the event location.