pub struct PtpCamera<C, E> { /* private fields */ }Expand description
A camera reached over PTP/IP: an open session and the DeviceInfo it reported.
Implementations§
Trait Implementations§
Source§impl<C: Read + Write, E: Read + Write> CameraDevice for PtpCamera<C, E>
impl<C: Read + Write, E: Read + Write> CameraDevice for PtpCamera<C, E>
Source§fn supports_partial_reads(&self) -> bool
fn supports_partial_reads(&self) -> bool
Whether
read_object accepts a non-zero offset.Source§fn storage_ids(&mut self) -> Result<Vec<u32>, CameraError>
fn storage_ids(&mut self) -> Result<Vec<u32>, CameraError>
The storages present.
Source§fn object_handles(&mut self, storage: u32) -> Result<Vec<u32>, CameraError>
fn object_handles(&mut self, storage: u32) -> Result<Vec<u32>, CameraError>
Every object handle on
storage, folders included, at any depth.Source§fn object(&mut self, handle: u32) -> Result<CameraObject, CameraError>
fn object(&mut self, handle: u32) -> Result<CameraObject, CameraError>
One object’s record.
Source§fn read_object(
&mut self,
object: &CameraObject,
offset: u64,
sink: &mut dyn Write,
) -> Result<u64, CameraError>
fn read_object( &mut self, object: &CameraObject, offset: u64, sink: &mut dyn Write, ) -> Result<u64, CameraError>
Stream
object’s bytes from offset to its end into sink; returns the bytes written.
A non-zero offset is only asked of a device that
supports partial reads, for an object of known size.Auto Trait Implementations§
impl<C, E> Freeze for PtpCamera<C, E>
impl<C, E> RefUnwindSafe for PtpCamera<C, E>where
C: RefUnwindSafe,
E: RefUnwindSafe,
impl<C, E> Send for PtpCamera<C, E>
impl<C, E> Sync for PtpCamera<C, E>
impl<C, E> Unpin for PtpCamera<C, E>
impl<C, E> UnsafeUnpin for PtpCamera<C, E>where
C: UnsafeUnpin,
E: UnsafeUnpin,
impl<C, E> UnwindSafe for PtpCamera<C, E>where
C: UnwindSafe,
E: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more