pub enum Op {
IPv4,
IPv6,
IPv4J,
IPv6J,
}Expand description
Enumeration for different types of operations provided by the Ipify API.
Each variant corresponds to a specific operation or request type.
§Variants
IPv4- Retrieves the IPv4 address in plain text format.IPv6- Retrieves the IPv6 address in plain text format (default).IPv4J- Retrieves the IPv4 address in JSON format.IPv6J- Retrieves the IPv6 address in JSON format.
§Examples
use ipify_rs::{Ipify, Op};
let mut client = Ipify::new();
client = client.set(Op::IPv4);
println!("Public IPv4 address: {}", client.call().unwrap());Variants§
Trait Implementations§
impl Copy for Op
impl StructuralPartialEq for Op
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnwindSafe for Op
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