// rscamper - Rust wrapper for scamper sting measurements
//
// Copyright (C) 2026 Dimitrios Giakatos
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 3.
use crate::ffi::scamper_sting::{self, ScamperStingT};
/// A scamper sting measurement result (stub).
pub struct ScamperSting { pub(crate) inner: *mut ScamperStingT }
impl ScamperSting {
pub(crate) unsafe fn from_ptr(ptr: *mut ScamperStingT) -> Option<Self> {
if ptr.is_null() { return None; }
Some(ScamperSting { inner: ptr })
}
}
impl Drop for ScamperSting {
fn drop(&mut self) { unsafe { scamper_sting::scamper_sting_free(self.inner) }; }
}
unsafe impl Send for ScamperSting {}
unsafe impl Sync for ScamperSting {}