[−][src]Struct dvdcss::DVD
An instance of dvdcss. Represents a DVD which has been loaded into a drive.
Must have its destructor run.
Implementations
impl DVD
[src]
pub fn new(location: &CStr) -> Option<Self>
[src]
Opens the DVD at the device location specified in the string (eg /dev/sr0).
Returns None
if there is no DVD in the drive.
pub fn seek(&self, blocks: u32, flags: SeekOptions) -> Result<u32, ()>
[src]
Sets the absolute position of the needle of the DVD.
The value blocks
determines in intervals of 2048 (the size of a block) the absolute
location to which the needle should be moved.
The flags
behavior is documented in SeekOptions
.
Returns Ok
and the new position in blocks if the operation succeeded, and
Err
if it did not.
pub fn read(&self, buffer: &mut [Block], decrypt: bool) -> Result<u32, ()>
[src]
Fills each Block
of buffer
with the raw contents of the DVD from the current
position of the needle, which is modifiable with the seek
function.
The decrypt
boolean should be enabled when the DVD is encrypted.
Returns Ok
and the accompanying number of blocks read if the operation
succeeded, and Err
if it did not.
pub fn is_scrambled(&self) -> bool
[src]
Returns whether the DVD being read is scrambled.
pub fn latest_error(&self) -> &CStr
[src]
Returns text describing the latest error encountered by dvdcss.
Output is undefined if no error was encountered, but should not crash to read.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DVD
[src]
impl !Send for DVD
[src]
impl !Sync for DVD
[src]
impl Unpin for DVD
[src]
impl UnwindSafe for DVD
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,