pub struct WatchedField {
anchor_video: String,
anchor_length: usize,
bitfield: BitField8,
}
Expand description
(De)Serializable field that tracks which videos have been watched and the latest one watched.
This is a WatchedBitField
compatible field, (de)serialized
without the knowledge of videos_ids
.
{anchor:video_id}:{anchor_length}:{bitfield8}
§Examples
use stremio_watched_bitfield::WatchedField;
// `tt2934286:1:5` - anchor video id
// `5` - anchor video length
// `eJyTZwAAAEAAIA==` - BitField8
let watched = "tt2934286:1:5:5:eJyTZwAAAEAAIA=="
.parse::<WatchedField>()
.expect("Should parse");
Fields§
§anchor_video: String
The anchor video id
Indicates which is the last watched video id.
anchor_length: usize
The length from the beginning of the BitField8
to the last
watched video.
bitfield: BitField8
Trait Implementations§
source§impl Clone for WatchedField
impl Clone for WatchedField
source§fn clone(&self) -> WatchedField
fn clone(&self) -> WatchedField
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for WatchedField
impl Debug for WatchedField
source§impl<'de> Deserialize<'de> for WatchedField
impl<'de> Deserialize<'de> for WatchedField
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
source§impl Display for WatchedField
impl Display for WatchedField
source§impl From<WatchedBitField> for WatchedField
impl From<WatchedBitField> for WatchedField
source§fn from(watched_bit_field: WatchedBitField) -> Self
fn from(watched_bit_field: WatchedBitField) -> Self
Converts to this type from the input type.
source§impl FromStr for WatchedField
impl FromStr for WatchedField
source§impl PartialEq for WatchedField
impl PartialEq for WatchedField
source§impl Serialize for WatchedField
impl Serialize for WatchedField
impl Eq for WatchedField
impl StructuralPartialEq for WatchedField
Auto Trait Implementations§
impl Freeze for WatchedField
impl RefUnwindSafe for WatchedField
impl Send for WatchedField
impl Sync for WatchedField
impl Unpin for WatchedField
impl UnwindSafe for WatchedField
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)