pub struct Toggle {
pub duration: Option<i64>,
}
Expand description
Used to set the params when posting a Toggle event
Fields§
§duration: Option<i64>
Implementations§
Source§impl Toggle
impl Toggle
Sourcepub fn new() -> Self
pub fn new() -> Self
Returns a new Toggle object
§Examples
extern crate lifx_rs as lifx;
fn main() {
let key = "xxx".to_string();
let mut api_endpoints: Vec<String> = Vec::new();
api_endpoints.push(format!("https://api.lifx.com"));
api_endpoints.push(format!("http://localhost:8089"));
let config = lifx::LifxConfig{
access_token: key.clone(),
api_endpoints: api_endpoints
};
let mut toggle = lifx::Toggle::new();
toggle.duration = Some(0);
}
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Toggle
impl<'de> Deserialize<'de> for Toggle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Toggle
Auto Trait Implementations§
impl Freeze for Toggle
impl RefUnwindSafe for Toggle
impl Send for Toggle
impl Sync for Toggle
impl Unpin for Toggle
impl UnwindSafe for Toggle
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